-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile
More file actions
28 lines (21 loc) · 718 Bytes
/
dockerfile
File metadata and controls
28 lines (21 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM alpine:3
WORKDIR /src
RUN mkdir /config
COPY src/ .
COPY src/entrypoint.sh /entrypoint.sh
RUN apk update && apk upgrade
RUN apk add docker-cli python3 py3-pip tzdata gosu
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN pip3 install discord.py && pip3 install prettytable setuptools>=78.1.1
# Non-Root Docker
RUN addgroup -S -g 988 docker && \
adduser -S -D -H -h /src -s /sbin/nologin -G docker -u 1000 nonroot && \
adduser nonroot docker && \
mkdir -p /config && \
chown nonroot:docker /config && \
chmod 2775 /config && \
chown -R nonroot:docker /src /entrypoint.sh && \
chmod -R 755 /src /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["python3", "bot.py"]