This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
covid-19-discord-bot/Dockerfile

34 lines
677 B
Text
Raw Normal View History

# 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" ]