File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -24,16 +24,6 @@ ENV ZOKRATES_HOME /app
2424ENV ZOKRATES_STDLIBv8 /app/stdlibv8
2525ENV ZOKRATES_STDLIB /app/stdlib
2626
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-
3727# Copy app files
3828COPY config/default.js config/default.js
3929COPY package.json package-lock.json ./
@@ -44,8 +34,19 @@ COPY --from=builder /app/zoKrates/target/release/zokrates /app/zokrates
4434COPY src ./src
4535COPY start-script ./start-script
4636COPY start-dev ./start-dev
37+
38+ # Install npm packages as root
39+ RUN npm i
40+
41+ # Change/Add permission to user $USERNAME
42+ RUN groupadd --gid 10001 $USERNAME && \
43+ useradd --gid 10001 --uid 10001 --home /app --shell /bin/bash $USERNAME && \
44+ chown -R $USERNAME:$USERNAME /app /app/output /app/circuits /npm-cache
45+ # Switch to user $USERNAME from root
46+ USER $USERNAME:$USERNAME
47+
48+ # Create directories
4749RUN mkdir -p /app/output
48- RUN mkdir -p /app/circuits
4950
5051EXPOSE 80
5152CMD npm start
You can’t perform that action at this time.
0 commit comments