-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
20 lines (18 loc) · 712 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM alpine:3.20 AS base-build
COPY . /root/
RUN apk add nodejs-current npm \
&& cd \
&& npm i --production
FROM alpine:3.20
COPY --from=base-build /usr/lib/node_modules/ /usr/lib/node_modules
RUN apk add nodejs-current dumb-init --no-cache\
&& ln -s /usr/lib/node_modules/npm/bin/npm-cli.js /usr/bin/npm \
&& adduser -D -H reelyactive \
&& chown reelyactive /home/
WORKDIR /home/
USER reelyactive
COPY --chown=reelyactive --from=base-build /root/ .
RUN mkdir -p data/associations data/images data/stories data/features && \
touch data/associations/LOCK data/images/LOCK data/stories/LOCK data/features/LOCK
EXPOSE 3001/tcp 50000/udp 50001/udp
CMD ["dumb-init","npm","run", "start"]