Dockerfile 619 B

123456789101112131415161718192021222324252627282930
  1. FROM node:21-alpine
  2. # Set labels
  3. LABEL repo="https://github.com/HeyPuter/puter"
  4. LABEL license="AGPL-3.0,https://github.com/HeyPuter/puter/blob/master/LICENSE.txt"
  5. LABEL version="v1.2.40-beta"
  6. # Debugging
  7. RUN apk add --no-cache bash # useful for debugging
  8. # Setup working directory
  9. RUN mkdir -p /opt/puter/app
  10. WORKDIR /opt/puter/app
  11. # Add source files
  12. # NOTE: This might change (https://github.com/HeyPuter/puter/discussions/32)
  13. COPY . .
  14. # Set permissions
  15. RUN chown -R node:node /opt/puter/app
  16. USER node
  17. # Install node modules
  18. RUN npm cache clean --force \
  19. && npm install
  20. EXPOSE 4100
  21. CMD [ "npm", "start" ]