# 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=covidbot ENV UID=991 ENV GID=991 RUN addgroup -g "${GID}" covidbot RUN adduser \ --disabled-password \ --gecos "" \ --home "/home/covidbot" \ --ingroup "${USER}" \ --uid "${UID}" \ "${USER}" USER covidbot WORKDIR /home/covidbot/ ENV PATH="${PATH}:/home/covidbot/.local/bin" COPY Pipfile Pipfile RUN pip install pipenv RUN pipenv install Pipfile COPY covid_bot.py covid_bot.py COPY config.json config.json ENTRYPOINT [ "pipenv", "run", "python", "covid_bot.py" ]