@@ -13,15 +13,16 @@ RUN set -ex; \
1313 #
1414 # add a non-root user to run our code as
1515 adduser --disabled-password --gecos "" appuser; \
16- mkdir /tmp /.cache/node/corepack/v1 -p; \
17- chmod 555 /tmp /.cache/node/corepack/v1; \
18- chown -R appuser /tmp /.cache/node;
16+ mkdir /somewhere /.cache/node/corepack/v1 -p; \
17+ chmod 555 /somewhere /.cache/node/corepack/v1; \
18+ chown -R appuser /somewhere /.cache/node;
1919
2020# install our test runner to /opt
2121WORKDIR /opt/test-runner
2222COPY . .
2323
24- ENV COREPACK_HOME=/tmp/.cache/node \
24+ ENV COREPACK_HOME=/somewhere/.cache/node \
25+ COREPACK_DEFAULT_TO_LATEST=0 \
2526 DEBUG=corepack;
2627
2728RUN set -ex; \
@@ -35,8 +36,8 @@ RUN set -ex; \
3536 #
3637 # https://github.com/nodejs/corepack/issues/414#issuecomment-2096218732
3738 # https://github.com/nodejs/corepack/blob/bc13d40037d0b1bfd386e260ae741f55505b5c7c/sources/folderUtils.ts#L26-L31
38- # chmod 444 /root /.cache/node/corepack/lastKnownGood.json; \
39- # chmod 555 /root /.cache/node/corepack/corepack; \
39+ # chmod 444 /somewhere /.cache/node/corepack/lastKnownGood.json; \
40+ # chmod 555 /somewhere /.cache/node/corepack/corepack; \
4041 #
4142 # Build the test runner
4243 # RUN set -ex; \
@@ -50,9 +51,6 @@ RUN set -ex; \
5051ENV COREPACK_ENABLE_NETWORK=0 \
5152 COREPACK_ENABLE_STRICT=0 \
5253 #
53- # Disable lastKnownGood
54- COREPACK_DEFAULT_TO_LATEST=0 \
55- #
5654 # Mark this as a docker run so we don't try to execute things in /tmp
5755 TMP_MAY_BE_NON_EXEC=1;
5856
0 commit comments