From c185f0000679b1e9c73a07cfcbe4b607733bc99e Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sun, 9 Jan 2022 15:36:21 +0000 Subject: [PATCH] Server: Call server start command directly, without going through npm --- Dockerfile.server | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile.server b/Dockerfile.server index c7aa4c1ee7..235c5d8684 100644 --- a/Dockerfile.server +++ b/Dockerfile.server @@ -88,9 +88,10 @@ RUN BUILD_SEQUENCIAL=1 yarn install --inline-builds ENV RUNNING_IN_DOCKER=1 EXPOSE ${APP_PORT} -# Not clear what's the equivalent of "--prefix" in Yarn 3, so keep using npm for -# now. -CMD [ "npm", "--prefix", "packages/server", "start" ] +# Call the command directly, without going via npm: +# https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#cmd +WORKDIR "/home/$user/packages/server" +CMD [ "node", "dist/app.js" ] # Build-time metadata # https://github.com/opencontainers/image-spec/blob/master/annotations.md