Skip to content

Commit

Permalink
Smaller docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
gthole committed Jun 3, 2018
1 parent 43c8e8d commit 3ad468a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
8 changes: 5 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
*.py[co]
*.pyc
settings.pyc
settings_local.py
*.ged
/tmp
/files
/data
tmp/
files/
data/
17 changes: 9 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
FROM python:2.7

COPY ./ /app/
FROM python:2.7-alpine

WORKDIR /app/
RUN pip install -r reqs.frozen.pip
RUN mkdir -p /static && python manage.py collectstatic -c --noinput
COPY ./reqs.frozen.pip /app/
ENV LIBRARY_PATH=/lib:/usr/lib
RUN apk --update add jpeg-dev zlib-dev build-base mariadb-dev && \
pip install -r reqs.frozen.pip && \
apk add mariadb-client-libs && \
apk del build-base mariadb-dev

RUN adduser --disabled-password --gecos '' gedgo
RUN chown -R gedgo:gedgo /app
USER gedgo
COPY ./ /app/
RUN mkdir -p /static && python manage.py collectstatic -c --noinput

0 comments on commit 3ad468a

Please sign in to comment.