Skip to content

Commit f2ffab5

Browse files
committed
Installing the wheel instead of the source dist
1 parent f5ce615 commit f2ffab5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

var/docker/Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
FROM python:3.9.5-slim
22

3-
ADD requirements.txt /
43
ADD migrations /migrations
5-
COPY dist/mrmat-python-api-flask-*.tar.gz /
4+
COPY dist/mrmat_python_api_flask-*.whl /
65
RUN \
76
groupadd -g 1000 flask \
87
&& useradd -u 1000 -g 1000 -c "Flask User" -M flask \
@@ -15,14 +14,14 @@ ENV FLASK_APP=mrmat_python_api_flask
1514
RUN \
1615
python -mvenv /app/venv \
1716
&& . /app/venv/bin/activate \
18-
&& pip install gunicorn wheel \
19-
&& pip install -r /requirements.txt \
20-
&& pip install /mrmat-python-api-flask-*.tar.gz \
17+
&& python -m pip install --no-cache-dir -U pip setuptools wheel \
18+
&& pip install --no-cache-dir gunicorn \
19+
&& pip install --no-cache-dir /mrmat_python_api_flask-*.whl \
2120
&& flask db upgrade
2221

2322
USER 0:0
2423
RUN \
25-
rm -rf /requirements.txt /mrmat-python-api-flask-*.tar.gz /migrations
24+
rm -rf /mrmat_python_api_flask-*.whl /migrations
2625

2726
EXPOSE 8080
2827
USER 1000:1000

0 commit comments

Comments
 (0)