Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

123456789101112131415161718192021222324252627282930313233343536
  1. FROM node:16-alpine
  2. WORKDIR /app
  3. COPY package*.json ./
  4. COPY src ./
  5. COPY public ./
  6. RUN yarn install
  7. # Bundle app source
  8. COPY . .
  9. EXPOSE 3000
  10. CMD ["yarn", "start"]
  11. ########################################################
  12. ################## BUILD VERSION #######################
  13. # Use a Node 16 base image
  14. #FROM node:16-alpine
  15. # Set the working directory to /app inside the container
  16. #WORKDIR /app
  17. # Copy app files
  18. #COPY . .
  19. # ==== BUILD =====
  20. # Install dependencies
  21. #RUN yarn
  22. # Build the app
  23. #RUN yarn run build
  24. # ==== RUN =======
  25. # Set the env to "production"
  26. #ENV NODE_ENV production
  27. # Expose the port on which the app will be running (3000 is the default that `serve` uses)
  28. #EXPOSE 3000
  29. # Start the app
  30. #CMD [ "npx", "serve", "build" ]