Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #27 from NBISweden/feature/docker_optimize
Browse files Browse the repository at this point in the history
Build a slimmer docker image
  • Loading branch information
jonandernovella authored Apr 7, 2020
2 parents a98ca65 + e755751 commit 6c9ca35
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
FROM python:3.7.6-slim-stretch
FROM python:3.7-alpine

WORKDIR /sda-auth

COPY . ./

RUN apt update && \
pip3 install -r requirements.txt && \
python3 setup.py install
RUN apk add --no-cache gcc musl-dev libffi-dev openssl-dev && \
pip install -r requirements.txt && \
python setup.py install && \
apk del gcc musl-dev libffi-dev openssl-dev && \
rm -rf /root/.cache

CMD ["python3", "sda_auth/route.py"]
CMD ["python", "sda_auth/route.py"]

0 comments on commit 6c9ca35

Please sign in to comment.