Skip to content

Commit bdaee6b

Browse files
committed
fix dockerfile
1 parent dc991ef commit bdaee6b

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

Dockerfile

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,21 @@ RUN cp -r /app/zoKratesv0.8.8 /app/zoKrates
1414

1515
FROM ubuntu:24.10
1616

17-
1817
ENV USERNAME="app"
1918

19+
WORKDIR /app
20+
2021
# Install NodeJs
2122
RUN 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

3427
ENV npm_config_cache=/npm-cache
3528
ENV ZOKRATES_HOME /app
3629
ENV ZOKRATES_STDLIBv8 /app/stdlibv8
3730
ENV ZOKRATES_STDLIB /app/stdlib
3831

39-
USER $USERNAME:$USERNAME
40-
41-
WORKDIR /app
42-
4332
COPY config/default.js config/default.js
4433
COPY package.json package-lock.json ./
4534
COPY --from=builder /app/zoKratesv0.8.8/zokrates_stdlib/stdlib /app/stdlibv8
@@ -52,5 +41,13 @@ COPY start-dev ./start-dev
5241

5342
RUN 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+
5552
EXPOSE 80
5653
CMD npm start

0 commit comments

Comments
 (0)