Skip to content

Commit

Permalink
fix(docker): user management
Browse files Browse the repository at this point in the history
* the user management was bad, if the user has the UID 1000 it was not
working.
* it was not working because the nodejs image contains a node user with
UID 1000.
* simply use the node user to fix this issue
  • Loading branch information
antoine-amara committed Mar 6, 2022
1 parent f7e6e3e commit e13b8f7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Docker/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14.16.0-alpine3.11
FROM node:16.13-alpine3.14

LABEL Author="Antoine AMARA <amara.antoine@gmail.com>"

Expand All @@ -9,8 +9,7 @@ RUN apk update && apk add yarn git
RUN npm install --global generate generate-license

# Hack to avoid executing comand as root user
RUN adduser --disabled-password --uid 1000 statickpack
USER statickpack
USER node

EXPOSE 9000
EXPOSE 9042
Expand Down

0 comments on commit e13b8f7

Please sign in to comment.