h4cker/docker-and-k8s-security/docker/Dockerfile.non-root

16 lines
213 B
Docker
Raw Normal View History

2021-04-11 17:33:39 +00:00
# Base Image
FROM node:12-slim
WORKDIR /usr/src/app
# Install Dependencies
COPY package*.json ./
RUN npm install
# Copy in Application
COPY . .
# Set User to Non-Root
USER node
# Run Server
CMD [ "server.js" ]