File size: 452 Bytes
a07d36d
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
FROM node:20-slim
ENV PORT ${PORT:-7860}
EXPOSE ${PORT}
ARG USERNAME=node
USER ${USERNAME}
WORKDIR /home/${USERNAME}/app 
COPY --chown=${USERNAME}:${USERNAME} ./package.json ./package.json
COPY --chown=${USERNAME}:${USERNAME} ./package-lock.json ./package-lock.json
COPY --chown=${USERNAME}:${USERNAME} ./.npmrc ./.npmrc
RUN npm ci
COPY --chown=${USERNAME}:${USERNAME} . .
RUN npm run build
WORKDIR /home/${USERNAME}/app/js13kserver
CMD [ "index.js" ]