From d979636a19aa8fd8e011eb6d5bd7548f3e5b1e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Sat, 11 Apr 2020 15:11:22 +0200 Subject: [PATCH] Fixing Dockerfiles --- back/.dockerignore | 1 + back/Dockerfile | 4 ++-- front/.dockerignore | 1 + front/Dockerfile | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/back/.dockerignore b/back/.dockerignore index ca0a17d7..576c21a2 100644 --- a/back/.dockerignore +++ b/back/.dockerignore @@ -2,3 +2,4 @@ /node_modules/ /dist/bundle.js /yarn-error.log +/Dockerfile diff --git a/back/Dockerfile b/back/Dockerfile index edaeee6a..316f505b 100644 --- a/back/Dockerfile +++ b/back/Dockerfile @@ -1,8 +1,8 @@ FROM thecodingmachine/nodejs:12 -COPY . . +COPY --chown=docker:docker . . RUN yarn install ENV NODE_ENV=production -CMD ['yarn', 'run', 'prod'] +CMD ["yarn", "run", "prod"] diff --git a/front/.dockerignore b/front/.dockerignore index 048e02ca..64d1025d 100644 --- a/front/.dockerignore +++ b/front/.dockerignore @@ -1,3 +1,4 @@ /node_modules/ /dist/bundle.js /yarn-error.log +/Dockerfile diff --git a/front/Dockerfile b/front/Dockerfile index 4ab4f273..ee15270e 100644 --- a/front/Dockerfile +++ b/front/Dockerfile @@ -1,7 +1,7 @@ # we are rebuilding on each deploy to cope with the API_URL environment URL FROM thecodingmachine/nodejs:12-apache -COPY . . +COPY --chown=docker:docker . . RUN yarn install ENV NODE_ENV=production