Dockerfile 836 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # !!! Don't try to build this Dockerfile directly, run it through bin/build-docker.sh script !!!
  2. FROM node:16.15.0-alpine
  3. # Create app directory
  4. WORKDIR /usr/src/app
  5. COPY server-package.json package.json
  6. # Install app dependencies
  7. RUN set -x \
  8. && apk add --no-cache --virtual .build-dependencies \
  9. autoconf \
  10. automake \
  11. g++ \
  12. gcc \
  13. libtool \
  14. make \
  15. nasm \
  16. libpng-dev \
  17. python3 \
  18. && npm install --production \
  19. && apk del .build-dependencies
  20. # Some setup tools need to be kept
  21. RUN apk add --no-cache su-exec shadow
  22. # Bundle app source
  23. COPY . .
  24. # Add application user and setup proper volume permissions
  25. RUN adduser -s /bin/false node; exit 0
  26. # Start the application
  27. EXPOSE 8080
  28. CMD [ "./start-docker.sh" ]
  29. HEALTHCHECK CMD sh DockerHealthcheck.sh