File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,17 @@ ENV npm_config_cache=/npm-cache
2323ENV ZOKRATES_HOME /app
2424ENV ZOKRATES_STDLIBv8 /app/stdlibv8
2525ENV ZOKRATES_STDLIB /app/stdlib
26+
27+ # Install npm packages as root
28+ RUN npm i
29+
30+ # Change/Add permission to user $USERNAME
31+ RUN groupadd --gid 10001 $USERNAME && \
32+ useradd --gid 10001 --uid 10001 --home /app --shell /bin/bash $USERNAME && \
33+ chown -R $USERNAME:$USERNAME /app /app/output /app/circuits /npm-cache
34+ # Switch to user $USERNAME from root
35+ USER $USERNAME:$USERNAME
36+
2637# Copy app files
2738COPY config/default.js config/default.js
2839COPY package.json package-lock.json ./
@@ -35,13 +46,6 @@ COPY start-script ./start-script
3546COPY start-dev ./start-dev
3647RUN mkdir -p /app/output
3748RUN mkdir -p /app/circuits
38- # Install npm packages as root
39- RUN npm i
40- # Change/Add permission to user $USERNAME
41- RUN groupadd --gid 10001 $USERNAME && \
42- useradd --gid 10001 --uid 10001 --home /app --shell /bin/bash $USERNAME && \
43- chown -R $USERNAME:$USERNAME /app /npm-cache /app
44- # Switch to user $USERNAME from root
45- USER $USERNAME:$USERNAME
49+
4650EXPOSE 80
4751CMD npm start
You can’t perform that action at this time.
0 commit comments