-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (34 loc) · 1.07 KB
/
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
FROM python:3.10-slim-buster
WORKDIR /podcast
ARG DEV_DEPS
COPY Pipfile /podcast
COPY Pipfile.lock /podcast
RUN groupadd -r podcast && useradd -r -g podcast podcast
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gcc \
libpq-dev \
python-dev \
wget \
unzip \
&& wget https://github.com/vot/ffbinaries-prebuilt/releases/download/v4.1/ffmpeg-4.1-linux-64.zip -q -O /tmp/ffmpeg-4.1-linux-64.zip \
&& unzip /tmp/ffmpeg-4.1-linux-64.zip -d /usr/bin \
&& rm /tmp/ffmpeg-4.1-linux-64.zip \
&& pip install pipenv==2023.7.23 \
&& if [ ${DEV_DEPS} = "true" ]; then \
echo "=== Install DEV dependencies ===" && \
pipenv install --dev --system; \
else \
echo "=== Install PROD dependencies ===" && \
pipenv install --system; \
fi \
&& apt-get purge -y --auto-remove gcc python-dev \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY ./src ./src
COPY entrypoint.sh .
COPY pytest.ini .
COPY .flake8 .
RUN chown -R podcast:podcast /podcast
ENTRYPOINT ["/bin/sh", "/podcast/entrypoint.sh"]