@@ -17,16 +17,18 @@ ADD . .
1717
1818USER 0
1919
20- ARG YARN_VERSION=v1.22.22
20+ ARG COREPACK_VERSION=0.34.6
2121
22- # bootstrap yarn so we can install and run the other tools.
23- RUN CACHED_YARN =./artifacts/yarn -${YARN_VERSION }.tar.gz; \
24- if [ -f ${CACHED_YARN } ]; then \
25- npm install ${CACHED_YARN }; \
22+ # bootstrap corepack so we can install and run the other tools.
23+ RUN CACHED_COREPACK =./artifacts/corepack -${COREPACK_VERSION }.tar.gz; \
24+ if [ -f ${CACHED_COREPACK } ]; then \
25+ npm install ${CACHED_COREPACK }; \
2626 else \
27- npm install https://github.com/yarnpkg/yarn /releases/download/${YARN_VERSION}/yarn-${YARN_VERSION}.tar.gz ; \
27+ npm install https://github.com/nodejs/corepack /releases/download/v${COREPACK_VERSION}/corepack.tgz ; \
2828 fi
2929
30+ RUN corepack enable
31+
3032# The REMOTE_SOURCES value is set by the build system to indicate the location of the cachito-backed artifacts cache.
3133# As cachito might not be available in all environments, we need to make sure the value is set before trying to use it and
3234# that the COPY layer below doesn't fail. Setting it to be the Dockerfile itself is fairly safe, as it will always be
@@ -39,7 +41,7 @@ COPY $REMOTE_SOURCES $REMOTE_SOURCES_DIR
3941# use dependencies provided by Cachito
4042RUN test -d ${REMOTE_SOURCES}/cachito-gomod-with-deps || exit 0; \
4143 cp -f $REMOTE_SOURCES_DIR/cachito-gomod-with-deps/app/registry-ca.pem . \
42- && cp -f $REMOTE_SOURCES_DIR/cachito-gomod-with-deps/app/frontend/{.npmrc,.yarnrc,yarn.lock} frontend/
44+ && cp -f $REMOTE_SOURCES_DIR/cachito-gomod-with-deps/app/frontend/{.npmrc,.yarnrc.yml ,yarn.lock} frontend/
4345
4446# prevent download of cypress binary as part of module installs
4547ENV CYPRESS_INSTALL_BINARY=0
0 commit comments