Skip to content

Commit 538f4f1

Browse files
committed
Create cache dir for user
1 parent 333bc96 commit 538f4f1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ RUN set -ex; \
1212
rm -rf /var/lib/apt/lists/*; \
1313
#
1414
# add a non-root user to run our code as
15-
adduser --disabled-password --gecos "" appuser;
15+
adduser --disabled-password --gecos "" appuser; \
16+
mkdir /home/appuser/.cache/node/corepack/v1 -p; \
17+
chmod 555 /home/appuser/.cache/node/corepack/v1; \
18+
chown appuser /home/appuser/.cache/node -r;
1619

1720
# install our test runner to /opt
1821
WORKDIR /opt/test-runner
@@ -43,6 +46,7 @@ RUN set -ex; \
4346
# Disable network for corepack
4447
ENV COREPACK_ENABLE_NETWORK=0 \
4548
COREPACK_ENABLE_STRICT=0 \
49+
COREPACK_DEFAULT_TO_LATEST=0 \
4650
#
4751
# Mark this as a docker run so we don't try to execute things in /tmp
4852
TMP_MAY_BE_NON_EXEC=1;

0 commit comments

Comments
 (0)