Skip to content

Instantly share code, notes, and snippets.

@ifiok
Last active July 26, 2018 13:31
Show Gist options
  • Save ifiok/00cbf034b09cbc1b89ff334948a529b8 to your computer and use it in GitHub Desktop.
Save ifiok/00cbf034b09cbc1b89ff334948a529b8 to your computer and use it in GitHub Desktop.
Dockerfile for Python 3 using pipenv and supervisor
ARG PYTHON_VERSION=3.7
ARG ALPINE_VERSION=3.7
FROM python:${PYTHON_VERSION}-alpine${ALPINE_VERSION}
WORKDIR /app
COPY supervisord.conf /etc/
COPY . /app
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
ENV BUILD_LIST git gcc make musl-dev
RUN apk add --update $BUILD_LIST \
&& apk add --update supervisor \
&& pip3 install --upgrade pip \
&& pip3 install pipenv \
&& pipenv install \
&& apk del $BUILD_LIST \
&& rm -rf /tmp/* /var/cache/apk/*
# Run processes with supervisord
ENTRYPOINT ["supervisord", "--nodaemon", "--configuration", "/etc/supervisord.conf"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment