Skip to content
Snippets Groups Projects
Dockerfile 419 B
Newer Older
  • Learn to ignore specific revisions
  • FROM node:14.20-slim
    
    
    # Create app directory
    WORKDIR /app
    
    # Install app dependencies
    # A wildcard is used to ensure both package.json AND package-lock.json are copied
    COPY package*.json ./
    
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
    RUN chgrp -R 0 /app && chmod -R g+rwX /app
    
    RUN npm install --silent
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
    COPY tsconfig.build.json .
    COPY tsconfig.json .
    COPY src src
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
    COPY scripts scripts
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
    RUN npm run build
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
    CMD npm run start:prod