File tree Expand file tree Collapse file tree 1 file changed +11
-14
lines changed
Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -14,32 +14,21 @@ RUN cp -r /app/zoKratesv0.8.8 /app/zoKrates
1414
1515FROM ubuntu:24.10
1616
17-
1817ENV USERNAME="app"
1918
19+ WORKDIR /app
20+
2021# Install NodeJs
2122RUN apt-get update && \
2223 apt-get install -y netcat-traditional curl && \
2324 curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
24- apt-get install -y nodejs gcc g++ make && \
25- # Remove existing home directory if it exists
26- rm -rf /app && \
27- # Create the app directory and set permissions
28- mkdir /app && \
29- groupadd --gid 10001 $USERNAME && \
30- useradd --gid 10001 --uid 10001 --home /app --shell /bin/bash $USERNAME && \
31- mkdir /npm-cache && \
32- chown -R $USERNAME:$USERNAME /app /npm-cache
25+ apt-get install -y nodejs gcc g++ make
3326
3427ENV npm_config_cache=/npm-cache
3528ENV ZOKRATES_HOME /app
3629ENV ZOKRATES_STDLIBv8 /app/stdlibv8
3730ENV ZOKRATES_STDLIB /app/stdlib
3831
39- USER $USERNAME:$USERNAME
40-
41- WORKDIR /app
42-
4332COPY config/default.js config/default.js
4433COPY package.json package-lock.json ./
4534COPY --from=builder /app/zoKratesv0.8.8/zokrates_stdlib/stdlib /app/stdlibv8
@@ -52,5 +41,13 @@ COPY start-dev ./start-dev
5241
5342RUN npm i
5443
44+ USER $USERNAME:$USERNAME
45+
46+ # Install NodeJs
47+ RUN groupadd --gid 10001 $USERNAME && \
48+ useradd --gid 10001 --uid 10001 --home /app --shell /bin/bash $USERNAME && \
49+ mkdir /npm-cache && \
50+ chown -R $USERNAME:$USERNAME /app /npm-cache
51+
5552EXPOSE 80
5653CMD npm start
You can’t perform that action at this time.
0 commit comments