forked from Cryptkeeper/Minetrack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (24 loc) · 918 Bytes
/
Dockerfile
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
29
30
31
32
FROM node:16
ARG TINI_VER="v0.19.0"
# install tini
ADD https://github.com/krallin/tini/releases/download/$TINI_VER/tini /sbin/tini
RUN chmod +x /sbin/tini
# install sqlite3
RUN apt-get update \
&& apt-get install --quiet --yes --no-install-recommends sqlite3 \
&& apt-get clean --quiet --yes \
&& apt-get autoremove --quiet --yes \
&& rm -rf /var/lib/apt/lists/*
# copy minetrack files
WORKDIR /usr/src/minetrack
COPY . .
# build minetrack
RUN npm install --build-from-source \
&& npm run build
# run as non root
RUN addgroup --gid 10043 --system minetrack \
&& adduser --uid 10042 --system --ingroup minetrack --no-create-home --gecos "" minetrack \
&& chown -R minetrack:minetrack /usr/src/minetrack
USER minetrack
EXPOSE 8080
ENTRYPOINT ["/sbin/tini", "--", "node", "main.js"]