Last active
July 26, 2018 13:31
-
-
Save ifiok/00cbf034b09cbc1b89ff334948a529b8 to your computer and use it in GitHub Desktop.
Dockerfile for Python 3 using pipenv and supervisor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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