From 4c6cc22829a7b4af5781dbfb38cd4309d101ba86 Mon Sep 17 00:00:00 2001 From: devthejo Date: Mon, 23 Oct 2023 14:24:54 +0200 Subject: [PATCH] fix: docker perms --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7a6909a1..e026a349 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,13 @@ FROM node:16-alpine +RUN chown -R 1000:1000 /home/node && \ + chmod -R 755 /home/node && \ + chown 1000:1000 /tmp && \ + chmod 1777 /tmp + WORKDIR /app -COPY . . +USER 1000 +COPY --chown=1000:1000 . . ARG NEXT_PUBLIC_API_URL ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL @@ -30,7 +36,6 @@ ENV NEXT_PUBLIC_CALENDLY_LINK=$NEXT_PUBLIC_CALENDLY_LINK RUN yarn --production --frozen-lockfile --prefer-offline && yarn cache clean RUN yarn build -USER 1000 ENV NODE_ENV=production ENV NEXT_TELEMETRY_DISABLED=1