ARG CHROME_VERSION='155.0.8059.84-1' FROM cypress/factory:7.4.0 RUN apt update && \ apt install curl jq python3 python3-venv python3-pip xauth skopeo -y RUN apt install python3-requests python3-click -y RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \ install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl RUN wget "https://github.com/sigstore/cosign/releases/download/v3.0.4/cosign-linux-amd64" && \ mv cosign-linux-amd64 /usr/local/bin/cosign && \ chmod +x /usr/local/bin/cosign USER node:0 COPY --chown=node:root --chmod=775 . /tmp/e2e RUN chmod -R 775 /tmp/e2e # Create yarn wrapper script to enable 'yarn' command # This delegates to the bundled, version-controlled yarn binary USER 0 RUN printf '#!/bin/sh\nexec node /tmp/e2e/.yarn/releases/yarn-4.12.0.cjs "$@"\n' > /usr/local/bin/yarn && \ chmod +x /usr/local/bin/yarn USER node:0 # Use yarn directly (wrapper delegates to bundled .cjs file) RUN cd /tmp/e2e && \ umask 0002 && \ yarn install --immutable && \ yarn cypress install && \ mkdir -p /tmp/artifacts && \ chmod -R a+rwx /tmp/artifacts ${CYPRESS_CACHE_FOLDER} WORKDIR /tmp/ COPY --chown=node:root --chmod=775 entrypoint.sh /tmp/ ENTRYPOINT ["/tmp/entrypoint.sh"] CMD [""]