Skip to content

Commit

Permalink
Merge pull request #89 from xsnippet/slim-image
Browse files Browse the repository at this point in the history
docker: use python:slim as a base to reduce the image size
  • Loading branch information
ikalnytskyi committed Jun 6, 2018
2 parents 8a4b59c + ad1f469 commit 8bf55b8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
FROM python:latest
MAINTAINER The XSnippet Team <dev@xsnippet.org>

COPY . /app
RUN pip install /app && rm -rf /app
WORKDIR /app
RUN mkdir dist && pip wheel --wheel-dir dist .


FROM python:slim
MAINTAINER The XSnippet Team <dev@xsnippet.org>

COPY --from=0 /app/dist /dist
RUN ls -la /dist && pip install --no-cache-dir --no-index --find-links=/dist xsnippet-api && rm -rf /dist
ENV XSNIPPET_API_SETTINGS=/etc/xsnippet-api.conf

EXPOSE 8000
Expand Down

0 comments on commit 8bf55b8

Please sign in to comment.