Skip to content

Commit

Permalink
Merge pull request #577 from kids-first/docker-debian-image
Browse files Browse the repository at this point in the history
🐳 Switch to python:3.8-slim-buster docker img
  • Loading branch information
znatty22 authored Feb 16, 2021
2 parents 843f0ba + 87e65ce commit 3ca47fd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
25 changes: 10 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
FROM python:3.7-alpine as base
FROM python:3.8-slim-buster as base
ENV PYTHONUNBUFFERED 1

RUN mkdir /app
WORKDIR /app
COPY requirements.txt /app/
RUN apk add --no-cache postgresql-libs postgresql-client && \
apk add --no-cache --virtual .build-deps gcc libffi-dev musl-dev postgresql-dev && \
pip install awscli && \
pip install -r requirements.txt --no-cache-dir && \
apk --purge del .build-deps
RUN apt-get update && \
apt-get install -y --no-install-recommends git
RUN pip install awscli && \
pip install --no-cache-dir -r requirements.txt

COPY . /app/

# Bake version number
RUN apk add --no-cache --virtual .build-deps git && \
cd /app && \
RUN cd /app && \
COMMIT=`git rev-parse --short HEAD` && echo "COMMIT=\"${COMMIT}\"" > /app/creator/version_info.py && \
VERSION=`git describe --always --tags` && echo "VERSION=\"${VERSION}\"" >> /app/creator/version_info.py && \
cd / && \
apk --purge del .build-deps
cd /

EXPOSE 80

Expand All @@ -28,16 +25,14 @@ FROM base as dev

ENV PRELOAD_DATA false
COPY dev-requirements.txt /app/
RUN apk add --no-cache --virtual .build-deps git && \
pip install -r /app/dev-requirements.txt && \
apk --purge del .build-deps
RUN pip install -r /app/dev-requirements.txt

CMD /app/bin/dev_entrypoint.sh


FROM base as prd

RUN apk add --no-cache jq wget supervisor
RUN apt-get install -y --no-install-recommends jq wget supervisor

RUN mkdir -p /var/log/supervisor/conf.d
COPY bin/worker.conf /etc/supervisor/conf.d/worker.conf
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ecs_service_type_1_standard {
projectName = "kf-api-study-creator"
environments = "dev,qa,prd"
docker_image_type = "alpine"
docker_image_type = "debian"
entrypoint_command = "/app/bin/entrypoint.sh"
quick_deploy = "true"
deploy_scripts_version = "master"
Expand Down

0 comments on commit 3ca47fd

Please sign in to comment.