uek-109-LBb/counter_kand/frontend/Dockerfile
2024-07-02 08:54:15 +00:00

24 lines
409 B
Docker

FROM node:19-alpine
ENV npm_config_cache ./.npm-cache
RUN apk add --no-cache dos2unix envsubst
WORKDIR /srv/app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN dos2unix entrypoint.sh && \
npm run build && \
chown node: build/index.html && \
chgrp -R 0 /srv/app && \
chmod -R g=u /srv/app
USER node
EXPOSE 3000
ENTRYPOINT [ "./entrypoint.sh" ]
CMD ["npm", "run", "start"]