# Pull Python 3.8.1 on alpine FROM python:3.8.1-alpine RUN apk --no-cache add gcc \ musl-dev \ python3-dev # Create a new user to run as and set the working directory ENV USER=covidreport ENV UID=991 ENV GID=991 RUN addgroup -g "${GID}" covidreport RUN adduser \ --disabled-password \ --gecos "" \ --home "/home/covidreport" \ --ingroup "${USER}" \ --uid "${UID}" \ "${USER}" USER covidreport WORKDIR /home/covidreport/ ENV PATH="${PATH}:/home/covidreport/.local/bin" COPY Pipfile Pipfile RUN pip install pipenv RUN pipenv install Pipfile COPY covid_report.py covid_report.py COPY config.json config.json ENTRYPOINT [ "pipenv", "run", "python", "covid_report.py" ]