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.
werefox-discord-bot/Dockerfile
2021-08-27 22:24:24 +00:00

30 lines
694 B
Docker

# Pull Python alpine
FROM python:alpine
RUN apk --no-cache add \
gcc \
g++ \
musl-dev \
python3-dev \
postgresql-dev \
libxml2-dev
# Create a new user to run as and set the working directory
ENV USER=werefox
ENV UID=991
ENV GID=991
RUN addgroup -g "${GID}" werefox
RUN adduser \
--disabled-password \
--gecos "" \
--home "/home/werefox" \
--ingroup "${USER}" \
--uid "${UID}" \
"${USER}"
USER werefox
WORKDIR /home/werefox/
ENV PATH="${PATH}:/home/werefox/.local/bin"
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY werefox_discord_bot.py werefox_discord_bot.py
ENTRYPOINT [ "python", "werefox_discord_bot.py" ]