2023-05-23 09:29:31 +08:00
|
|
|
FROM python:3.11-slim-buster
|
|
|
|
ARG BRANCH_NAME=master
|
|
|
|
ENV BRANCH_NAME ${BRANCH_NAME}
|
|
|
|
ENV TINI_VERSION v0.19.0
|
|
|
|
ENV QBM_DOCKER True
|
2022-01-03 01:14:26 +08:00
|
|
|
|
|
|
|
COPY requirements.txt /
|
2021-12-16 07:34:26 +08:00
|
|
|
|
2023-05-23 09:29:31 +08:00
|
|
|
# install packages
|
|
|
|
RUN echo "**** install system packages ****" \
|
|
|
|
&& apt-get update \
|
|
|
|
&& apt-get upgrade -y --no-install-recommends \
|
|
|
|
&& apt-get install -y tzdata --no-install-recommends \
|
2023-05-23 09:50:29 +08:00
|
|
|
&& apt-get install -y gcc g++ libxml2-dev libxslt-dev libz-dev bash curl wget jq grep sed coreutils findutils unzip p7zip ca-certificates \
|
2023-05-23 09:29:31 +08:00
|
|
|
&& wget -O /tini https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-"$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
|
|
|
|
&& chmod +x /tini \
|
2022-01-03 01:14:26 +08:00
|
|
|
&& pip3 install --no-cache-dir --upgrade --requirement /requirements.txt \
|
2023-05-23 09:29:31 +08:00
|
|
|
&& apt-get --purge autoremove gcc g++ libxml2-dev libxslt-dev libz-dev -y \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& apt-get update \
|
|
|
|
&& apt-get check \
|
|
|
|
&& apt-get -f install \
|
|
|
|
&& apt-get autoclean \
|
|
|
|
&& rm -rf /requirements.txt /tmp/* /var/tmp/* /var/lib/apt/lists/*
|
2021-12-16 07:34:26 +08:00
|
|
|
|
2022-01-03 01:14:26 +08:00
|
|
|
COPY . /app
|
|
|
|
WORKDIR /app
|
|
|
|
VOLUME /config
|
2023-05-23 09:37:56 +08:00
|
|
|
ENTRYPOINT ["/tini", "-s", "python3", "qbit_manage.py", "--"]
|