Skip to content

Commit

Permalink
install pm2 before going to the new user
Browse files Browse the repository at this point in the history
  • Loading branch information
JEMeyer committed Jun 2, 2024
1 parent 6f87b97 commit a9379d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ FROM node:18-alpine as base
# Install Docker CLI and Docker Compose
RUN apk add --no-cache docker docker-cli-compose shadow

# Install PM2 globally
RUN npm install -g pm2

ARG USERNAME=appuser
RUN adduser --disabled-password --gecos "" $USERNAME
RUN addgroup $USERNAME docker
USER $USERNAME

# Install PM2 globally
RUN npm install -g pm2

# Builder stage
FROM base AS builder

Expand Down

0 comments on commit a9379d3

Please sign in to comment.