File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ RUN cargo +nightly-2022-06-28 build -p zokrates_cli --release
1717FROM ubuntu:24.10
1818WORKDIR /app
1919
20+ ENV USERNAME="app"
21+
2022COPY config/default.js config/default.js
2123COPY package.json package-lock.json ./
2224COPY --from=builder /app/zoKratesv0.7.12/zokrates_stdlib/stdlib /app/stdlibv7
@@ -37,6 +39,14 @@ ENV ZOKRATES_STDLIB /app/stdlib
3739
3840RUN npm i
3941
42+ # Change to User defined in base image
43+ RUN addgroup --gid 10001 $USERNAME && \
44+ adduser --gid 10001 --uid 10001 --home /app $USERNAME
45+ RUN chown -R $USERNAME:$USERNAME /app
46+ RUN mkdir /npm-cache
47+ RUN chown -R $USERNAME:$USERNAME /npm-cache
48+ ENV npm_config_cache=/npm-cache
49+
4050USER $USERNAME:$USERNAME
4151EXPOSE 80
4252CMD npm start
You can’t perform that action at this time.
0 commit comments