Skip to content

Commit 396d011

Browse files
committed
Add dependencies to build
1 parent f5ad417 commit 396d011

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
FROM python:3.8-alpine
22

3+
ARG buildDeps='gcc g++ unixodbc-dev'
4+
35
WORKDIR /usr/src/app
46

57
COPY . .
68

7-
RUN pip3 install -r requirements/prod.txt
9+
RUN apk update \
10+
&& apk add --no-cache $buildDeps \
11+
&& pip3 install --no-cache-dir -r requirements/prod.txt \
12+
&& apk del $buildDeps \
13+
&& rm -rfv /root/.cache/pip/* && \
14+
find /usr/local \( -type d -a -name test -o -name tests \) -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm -rfv '{}' \+
815

916
ENV FLASK_APP time_tracker_api
1017

0 commit comments

Comments
 (0)