mirror of
https://github.com/lovasoa/whitebophir
synced 2024-11-12 23:37:14 +00:00
Run as non-priviledged user in the docker image
This commit is contained in:
parent
ec52bc9631
commit
ce5ca084b9
1 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,12 @@
|
||||||
FROM node:14-alpine
|
FROM node:14-alpine
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /opt/app
|
WORKDIR /opt/app
|
||||||
|
|
||||||
|
RUN chown -R 1000:1000 /opt/app
|
||||||
|
|
||||||
|
USER 1000:1000
|
||||||
|
|
||||||
COPY package.json package-lock.json ./
|
COPY package.json package-lock.json ./
|
||||||
RUN npm ci --production
|
RUN npm ci --production
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
Loading…
Reference in a new issue