Files
ButlerBot/Dockerfile
2024-09-16 09:56:40 +00:00

23 lines
325 B
Docker

FROM node:lts-alpine
# Create app directory and copy the app
WORKDIR /app
COPY . .
# Run as non-root user
RUN addgroup -g 1001 -S nodejs
RUN adduser -S nodejs -u 1001
RUN chown -R nodejs:nodejs /app
USER nodejs
# Install
RUN npm install
# Build
RUN npm run build
# Start the app
ENTRYPOINT ["npm", "run"]
CMD ["start"]