FROM python:3.7-slim-stretch MAINTAINER Drew Short ENV SERVER_APP_DIRECTORY /opt/server ENV SERVER_CONFIG_DIRECTORY /srv/server/config ENV SERVER_DATA_DIRECTORY /srv/server/data RUN mkdir -p ${SERVER_APP_DIRECTORY} \ && mkdir -p ${SERVER_CONFIG_DIRECTORY} \ && mkdir -p ${SERVER_DATA_DIRECTORY} \ && pip install pipenv gunicorn VOLUME ${SERVER_CONFIG_DIRECTORY} VOLUME ${SERVER_DATA_DIRECTORY} COPY ./ ${SERVER_APP_DIRECTORY}/ RUN cd ${SERVER_APP_DIRECTORY} \ && pipenv install --system --deploy --ignore-pipfile EXPOSE 8080 WORKDIR ${SERVER_APP_DIRECTORY} CMD ./entrypoint.sh