Skip to content

Commit

Permalink
fix: Lock manager docker file .npm ownership
Browse files Browse the repository at this point in the history
  • Loading branch information
fmarek-kindred committed Feb 7, 2024
1 parent a8cfed6 commit 2664a89
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
14 changes: 0 additions & 14 deletions lock-manager/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,9 @@ FROM node:18.18.2-alpine3.18 AS baseimage
# Build image
FROM baseimage AS BUILD

ENV USER=pit
ENV UID=1001
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid "${UID}" \
"${USER}"

WORKDIR /opt/build
COPY package.json package-lock.json tsconfig.json ./
RUN npm ci
RUN chown -R 1001:0 "/.npm"

COPY src/ ./src

Expand All @@ -33,7 +21,5 @@ COPY --from=BUILD /opt/build/node_modules/ ./node_modules
COPY --from=BUILD /opt/build/dist/ ./dist
COPY migrations/ ./migrations

USER ${USER}:${USER}

CMD ["npm", "run", "migrate_and_start"]

2 changes: 1 addition & 1 deletion lock-manager/deployment/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ WEB_APP_CONTEXT_ROOT:
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
runAsUser: 1001
runAsUser: 1000

0 comments on commit 2664a89

Please sign in to comment.