@@ -21,11 +21,12 @@ RUN curl -kL https://services.gradle.org/distributions/gradle-9.2.1-bin.zip -o /
2121RUN curl -kL https://go.dev/dl/go1.25.5.linux-amd64.tar.gz -o /tmp/golang-package.tar.gz \
2222 && tar xvzf /tmp/golang-package.tar.gz -C /usr/
2323
24- # install corepack and package managers (pnpm, yarn) - stage to /usr/local for easy copying
24+ # install corepack and package managers (pnpm, yarn classic + berry ) - stage to /usr/local for easy copying
2525ENV COREPACK_HOME=/usr/local/corepack/cache
2626RUN npm install -g corepack@latest \
2727 && corepack enable \
2828 && corepack prepare pnpm@10.1.0 --activate \
29+ && corepack prepare yarn@1.22.22 \
2930 && corepack prepare yarn@4.9.1 --activate \
3031 && NPM_PREFIX=$(npm config get prefix) \
3132 && mkdir -p /usr/local/corepack/bin \
@@ -111,12 +112,15 @@ ENV GRADLE_HOME=/usr/gradle-9.2.1
111112COPY --from=builder /usr/local/corepack/ /usr/local/corepack/
112113ENV COREPACK_HOME=/usr/local/corepack/cache
113114
114- # Install Python via microdnf and fix corepack cache permissions
115+ # Install Python via microdnf, create yarn wrapper scripts, and fix permissions
115116USER root
116117RUN microdnf install -y python3 python3-pip \
117118 && microdnf clean all \
118119 && chown -R 1001:0 /usr/local/corepack/cache \
119- && chmod -R g+rwX /usr/local/corepack/cache
120+ && chmod -R g+rwX /usr/local/corepack/cache \
121+ && printf '#!/bin/sh\nexec corepack yarn@1.22.22 "$@"\n' > /usr/local/bin/yarn-classic \
122+ && printf '#!/bin/sh\nexec corepack yarn@4.9.1 "$@"\n' > /usr/local/bin/yarn-berry \
123+ && chmod +x /usr/local/bin/yarn-classic /usr/local/bin/yarn-berry
120124USER 1001
121125
122126# Update PATH (corepack bin first for pnpm/yarn to be found reliably)
0 commit comments