Skip to content

Commit

Permalink
Adjust incognia.Dockerfile to set a working yarn version
Browse files Browse the repository at this point in the history
The "yarn set version berry" downloads the yarn version 4, but it
is not compatible with the node version currently used in this project.
Note that the yarn v3 is being used, because the yarn v2 is downloading
the workspace-tools using the wrong URL, so it would break the build.
  • Loading branch information
cfms3 committed Mar 13, 2024
1 parent 7f97904 commit 9fc29c3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions incognia.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ COPY packages/cubejs-server-core/package.json packages/cubejs-server-core/packag

FROM base AS prod_deps

# Use yarn v2 because of https://github.com/yarnpkg/yarn/issues/6323
RUN yarn set version berry
# Use yarn v2+ because of https://github.com/yarnpkg/yarn/issues/6323
# The yarn versions prior to 1.22.20 have a bug that it always download
# the latest release, so first we manually go to the 4.1.1 before going
# to the target version.
RUN YARN_IGNORE_NODE=1 yarn set version 4.1.1
RUN YARN_IGNORE_NODE=1 yarn set version 3.8.1
RUN yarn plugin import workspace-tools
RUN yarn config set nodeLinker node-modules
RUN yarn workspaces focus --production --all
Expand Down

0 comments on commit 9fc29c3

Please sign in to comment.