From c7f1f1b89d7f9494f27446e94e4ff603da741100 Mon Sep 17 00:00:00 2001 From: Buster Neece Date: Tue, 12 Dec 2023 09:41:07 -0600 Subject: [PATCH] Fixes. --- Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index f0f2ffd..203bdf3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,6 +31,9 @@ CMD ["npm", "run", "dev"] FROM base AS production-builds +RUN mkdir -p /dist \ + && chown -R node:node /dist + WORKDIR /data COPY . . @@ -44,8 +47,9 @@ USER node RUN npm ci --include=dev \ && npm run build \ - && rm -rf /data/node_modules \ - && mv /data/dist /dist + && rm -rf ./node_modules \ + && cp -RT ./dist /dist \ + && rm -rf ./dist FROM production-builds AS builtin @@ -70,5 +74,5 @@ RUN rm -rf ./src ./dist ./public \ && npm run builtin-build \ && rm -rf ./node_modules \ && cd builtin \ - && rm -rf ./src ./dist ./public \ - && mv ./dist /dist + && cp -RT ./dist /dist \ + && rm -rf ./src ./dist ./public