From 41a8956424a5928785fd95175c0baa80783c59a8 Mon Sep 17 00:00:00 2001 From: aevesdocker Date: Thu, 14 Mar 2024 17:00:31 +0000 Subject: [PATCH 1/3] adjust-compose-example --- content/compose/file-watch.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content/compose/file-watch.md b/content/compose/file-watch.md index cb4a85f5268c..4998fe063b65 100644 --- a/content/compose/file-watch.md +++ b/content/compose/file-watch.md @@ -65,6 +65,9 @@ USER app # Copy source files into application directory COPY --chown=app:app . /app + +# Install dependencies +RUN npm install ``` ### `action` From 7cbf62ce561365a563fd5b3b192a4ddfd5a7fc14 Mon Sep 17 00:00:00 2001 From: aevesdocker Date: Thu, 14 Mar 2024 17:24:41 +0000 Subject: [PATCH 2/3] adjust-compose-example --- content/compose/file-watch.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/compose/file-watch.md b/content/compose/file-watch.md index 4998fe063b65..4531506fa34a 100644 --- a/content/compose/file-watch.md +++ b/content/compose/file-watch.md @@ -63,11 +63,12 @@ FROM node:18-alpine RUN useradd -ms /bin/sh -u 1001 app USER app -# Copy source files into application directory -COPY --chown=app:app . /app - # Install dependencies +COPY package.json package.lock ./ RUN npm install + +# Copy source files into application directory +COPY --chown=app:app . /app ``` ### `action` From dc8b37e139461cd06561d1a290afad0fb8f91e11 Mon Sep 17 00:00:00 2001 From: aevesdocker Date: Thu, 14 Mar 2024 17:25:45 +0000 Subject: [PATCH 3/3] adjust-compose-example --- content/compose/file-watch.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/compose/file-watch.md b/content/compose/file-watch.md index 4531506fa34a..9f8defe5ad0e 100644 --- a/content/compose/file-watch.md +++ b/content/compose/file-watch.md @@ -64,7 +64,8 @@ RUN useradd -ms /bin/sh -u 1001 app USER app # Install dependencies -COPY package.json package.lock ./ +WORKDIR /app +COPY package.json package.lock . RUN npm install # Copy source files into application directory