forked from jewelkepo/gdrive-clone-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (30 loc) · 908 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# COMPILE
FROM python:3.10-slim-bullseye as compiler
ENV PYTHONUNBUFFERED 1
WORKDIR /project/
RUN python3 -m venv --upgrade-deps /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
COPY requirements.txt .
RUN pip3 install --no-cache-dir -U wheel \
&& pip3 install --no-cache-dir -Ur requirements.txt
# RUN
FROM python:3.10-slim-bullseye as runner
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
RUN DEBIAN_FRONTEND="noninteractive" \
apt-get -y update \
&& apt-get -y --no-install-recommends install \
curl \
git \
procps \
&& apt-get -y clean \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /project/
RUN chmod 777 /project/
COPY --from=compiler /opt/venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
COPY . .
ENTRYPOINT ["/tini", "--"]
CMD ["bash", "start.sh"]