diff options
| author | 2018-09-19 21:15:11 +0200 | |
|---|---|---|
| committer | 2018-09-19 21:15:11 +0200 | |
| commit | 1ffe7c83f251b1cc2bbb5cec79222656636efb67 (patch) | |
| tree | 5a6428e619b1555caca8db5a935f006f5260b209 /docker/app | |
| parent | Reorder headers. (diff) | |
Use `apk` virtualenv for build-time dependencies.
Diffstat (limited to 'docker/app')
| -rw-r--r-- | docker/app/alpine/3.6/Dockerfile | 13 | ||||
| -rw-r--r-- | docker/app/alpine/3.7/Dockerfile | 15 | 
2 files changed, 18 insertions, 10 deletions
| diff --git a/docker/app/alpine/3.6/Dockerfile b/docker/app/alpine/3.6/Dockerfile index d78930f0..0dedd6da 100644 --- a/docker/app/alpine/3.6/Dockerfile +++ b/docker/app/alpine/3.6/Dockerfile @@ -2,17 +2,22 @@ FROM python:3.6-alpine  ARG EXTRAS=deploy -RUN apk add \ +# Build-time dependencies: To be removed later. +RUN apk add --no-cache --virtual build \          gcc \          musl-dev \          postgresql-dev +# Used by the healthcheck. +RUN apk add --no-cache curl +  WORKDIR /app  COPY setup.py /app/setup.py  RUN python3 -m pip install .[$EXTRAS] -COPY . . +# Remove dependencies used for building psycopg2. +RUN apk del --purge build -RUN apk del \ -        gcc +COPY . . +HEALTHCHECK CMD curl -I -f localhost:4000  CMD ["gunicorn", "--workers", "4", "--bind", "0.0.0.0:4000", "pysite.wsgi:application"] diff --git a/docker/app/alpine/3.7/Dockerfile b/docker/app/alpine/3.7/Dockerfile index 8ff06287..e7c8d696 100644 --- a/docker/app/alpine/3.7/Dockerfile +++ b/docker/app/alpine/3.7/Dockerfile @@ -2,19 +2,22 @@ FROM python:3.7-alpine  ARG EXTRAS=deploy -RUN apk add \ -        curl \ +# Build-time dependencies: To be removed later. +RUN apk add --virtual build \          gcc \          musl-dev \          postgresql-dev +# Used by the healthcheck. +RUN apk add --no-cache curl +  WORKDIR /app  COPY setup.py /app/setup.py  RUN python3 -m pip install .[$EXTRAS] -COPY . . +# Remove dependencies used for building psycopg2. +RUN apk del --purge build -RUN apk del \ -        gcc +COPY . . -HEALTHCHECK CMD curl -I localhost:4000 || exit 1 +HEALTHCHECK CMD curl -I -f localhost:4000  CMD ["gunicorn", "--workers", "4", "--bind", "0.0.0.0:4000", "pysite.wsgi:application"] | 
