From a431d537248d97a2c11d51a5db45aa42fbe7e0f9 Mon Sep 17 00:00:00 2001 From: Alex Layton Date: Wed, 20 Nov 2024 12:30:19 -0500 Subject: [PATCH] fix: use corepack in Dockerfile --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index b9e1d32..88dca9d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,30 +24,30 @@ RUN apk add --no-cache \ WORKDIR ${DIR} -COPY ./.yarn ${DIR}.yarn +#COPY ./.yarn ${DIR}.yarn COPY ./package.json ./yarn.lock ./.yarnrc.yml ${DIR}/ RUN chown -R node:node ${DIR} # Do not run service as root USER node -RUN yarn workspaces focus --all --production +RUN corepack yarn workspaces focus --all --production # Launch entrypoint with dumb-init # Remap SIGTERM to SIGINT https://github.com/Yelp/dumb-init#signal-rewriting -ENTRYPOINT ["/usr/bin/dumb-init", "--rewrite", "15:2", "--", "yarn", "run"] +ENTRYPOINT ["/usr/bin/dumb-init", "--rewrite", "15:2", "--", "corepack", "yarn", "run"] CMD ["start"] FROM base AS build ARG DIR # Install dev deps too -RUN yarn install --immutable +RUN corepack yarn install --immutable COPY . ${DIR} # Build code -RUN yarn build --verbose +RUN corepack yarn build --verbose FROM base AS production ARG DIR