Dockerfile 947 B

12345678910111213141516171819202122232425262728293031
  1. FROM node:10
  2. # Before modifying this file, please refer to:
  3. # https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md
  4. # Change the working directory to user source app directory
  5. # you should not mount to this directory, this is only to hold the build source files
  6. # see entrypoin.sh
  7. # it will copy the required source files to /app directory on run
  8. # this allows to mount a volume to /app when needed (mostly for development)
  9. WORKDIR /usr/src/app
  10. # Install VUE CLI
  11. # keeping run seperate so that it dsn't compile this layer for every build
  12. RUN npm install -g @vue/cli eslint
  13. COPY package*.json ./
  14. # Check VUE version and install package.json dependencies
  15. RUN vue --version && \
  16. npm install
  17. RUN mkdir -p /app && chown node:node /app
  18. WORKDIR /app
  19. COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint-proxy.sh
  20. RUN chmod +x /usr/local/bin/docker-entrypoint-proxy.sh
  21. USER node
  22. ENTRYPOINT ["docker-entrypoint-proxy.sh"]