forked from TheSharks/WildBeast
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (19 loc) · 697 Bytes
/
Dockerfile
File metadata and controls
23 lines (19 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM node:10
ARG buildno
ARG commitsha
LABEL maintainer="Remco Jongschaap hello@dougley.com" \
repository="https://github.com/TheSharks/WildBeast" \
buildno=$buildno \
commit=$commitsha
# Don't run wildbeast as root (safety)
RUN useradd -m -d /home/wildbeast -s /bin/bash wildbeast
RUN mkdir /opt/wildbeast && chown wildbeast /opt/wildbeast -R
# Copy files and install modules
COPY . /opt/wildbeast
WORKDIR /opt/wildbeast
RUN npm i --production
# Install optional native modules
RUN npm i zlib-sync uws@10.148.1 https://github.com/discordapp/erlpack.git bufferutil sodium-native node-opus
# Switch to wildbeast user and run entrypoint
USER wildbeast
CMD ["node", "index.js"]