From c0c7085eb5026becbf51990dfca33323d24de966 Mon Sep 17 00:00:00 2001 From: cristianpb Date: Tue, 5 Mar 2024 07:33:50 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=B3=20Use=20entry=20point=20instead=20?= =?UTF-8?q?of=20cmd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1cd26b5..e282e9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ####################### # Step 1: Base target # ####################### -FROM --platform=$BUILDPLATFORM node:20 as development +FROM node:20 as development ARG NPM_VERBOSE ARG app_path @@ -24,12 +24,12 @@ VOLUME ${app_path}/data COPY tsconfig.json ./ -CMD ["npm","run", "dev"] +ENTRYPOINT ["npm","run", "dev"] ########################## # Step 3: "build" target # ########################## -FROM --platform=$BUILDPLATFORM development as build +FROM development as build ARG app_path WORKDIR $app_path @@ -43,7 +43,7 @@ RUN npm run build ############################### # Step 4: "production" target # ############################### -FROM --platform=$BUILDPLATFORM node:20-alpine as production +FROM node:20-alpine as production ARG app_path WORKDIR $app_path @@ -60,4 +60,4 @@ VOLUME ${app_path}/data COPY --from=build ${app_path}/node_modules ${app_path}/node_modules COPY --from=build ${app_path}/dist ${app_path}/dist -CMD ["npm","run", "start"] +ENTRYPOINT ["npm","run", "start"]