@@ -9,21 +9,15 @@ RUN set -ex; \
99 # curl is required to fetch our webhook from github
1010 # unzip is required for unzipping payloads in development
1111 apt-get install curl unzip jq -y; \
12- rm -rf /var/lib/apt/lists/*
12+ rm -rf /var/lib/apt/lists/*; \
1313
14- # add a non-root user to run our code as
15- RUN adduser --disabled-password --gecos "" appuser
14+ # add a non-root user to run our code as
15+ adduser --disabled-password --gecos "" appuser;
1616
1717# install our test runner to /opt
1818WORKDIR /opt/test-runner
1919COPY . .
2020
21- # Install pnpm so it will be available read-only
22- # https://github.com/nodejs/corepack/issues/183#issue-1379672431
23- # https://github.com/nodejs/corepack/blob/bc13d40037d0b1bfd386e260ae741f55505b5c7c/tests/main.test.ts#L483
24- RUN mkdir -p /idk/corepack
25- ENV COREPACK_HOME=/idk/corepack
26-
2721RUN set -ex; \
2822 corepack enable pnpm; \
2923 # corepack pack -o ./corepack.tgz; \
@@ -35,23 +29,23 @@ RUN set -ex; \
3529 #
3630 # https://github.com/nodejs/corepack/issues/414#issuecomment-2096218732
3731 # https://github.com/nodejs/corepack/blob/bc13d40037d0b1bfd386e260ae741f55505b5c7c/sources/folderUtils.ts#L26-L31
38- chmod 444 /idk /corepack/lastKnownGood.json; \
39- chmod 555 /idk/ corepack;
32+ chmod 444 /root/.cache/node /corepack/lastKnownGood.json; \
33+ chmod 555 /root/.cache/node/ corepack/corepack; \
4034
41- # Build the test runner
42- RUN set -ex; \
35+ # Build the test runner
36+ # RUN set -ex; \
4337 # install all the development modules (used for building)
4438 # corepack pnpm store prune; \
4539 corepack pnpm install; \
4640 corepack pnpm build; \
4741 corepack pnpm prune --prod;
4842
4943# Disable network for corepack
50- ENV COREPACK_ENABLE_NETWORK=0
51- ENV COREPACK_ENABLE_STRICT=0
44+ ENV COREPACK_ENABLE_NETWORK=0 \
45+ COREPACK_ENABLE_STRICT=0 \
5246
53- # Mark this as a docker run so we don't try to execute things in /tmp
54- ENV TMP_MAY_BE_NON_EXEC=1
47+ # Mark this as a docker run so we don't try to execute things in /tmp
48+ TMP_MAY_BE_NON_EXEC=1;
5549
5650# Execute everything as the appuser
5751USER appuser
0 commit comments