From 1c7024aaaf2a0b7da6f1f00a9be324cf701c53f4 Mon Sep 17 00:00:00 2001 From: Maria Livshits <36592446+tubleronchik@users.noreply.github.com> Date: Sat, 4 May 2024 19:14:20 +0300 Subject: [PATCH 1/2] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0551f67..f225ab8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM node:18-alpine -WORKDIR /proxy +WORKDIR /home/node/proxy COPY . . RUN touch /proxy/peerIdJson.json RUN npm ci --only=production @@ -7,4 +7,4 @@ ARG PORT=8888 ENV PORT=${PORT} EXPOSE ${PORT} CMD ["node", "src/index.js"] -EXPOSE 9999 \ No newline at end of file +EXPOSE 9999 From 14668e6ca7f4894474eaf25c260924bd7b610bf4 Mon Sep 17 00:00:00 2001 From: tubleronchik Date: Mon, 6 May 2024 15:18:56 +0300 Subject: [PATCH 2/2] upd dockerfile --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f225ab8..bfbed7f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM node:18-alpine -WORKDIR /home/node/proxy +WORKDIR /proxy +RUN chown -R node:node /proxy +RUN chmod -R 777 /proxy COPY . . RUN touch /proxy/peerIdJson.json RUN npm ci --only=production @@ -8,3 +10,4 @@ ENV PORT=${PORT} EXPOSE ${PORT} CMD ["node", "src/index.js"] EXPOSE 9999 +USER node \ No newline at end of file