Skip to content

Commit

Permalink
Disable entwork in docker file for yarn and corepack
Browse files Browse the repository at this point in the history
  • Loading branch information
SleeplessByte committed Jul 29, 2024
1 parent 29bd611 commit 6dbfec4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN set -ex; \

# add a non-root user to run our code as
RUN adduser --disabled-password --gecos "" appuser
RUN mkdir -p /home/appuser/.cache/node/corepack/v1
RUN mkdir -p /home/appuser/.cache/node/corepack

# install our test runner to /opt
WORKDIR /opt/test-runner
Expand All @@ -22,7 +22,9 @@ COPY . .
# Build the test runner
RUN set -ex; \
corepack enable; \
# install corepack globally with the last known good version of yarn
corepack pack -o ./corepack.tgz; \
COREPACK_ENABLE_NETWORK=0 corepack install -g "./corepack.tgz"; \
# install all the development modules (used for building)
yarn cache clean; \
yarn install; \
Expand All @@ -36,5 +38,8 @@ RUN set -ex; \
#
# TODO: yarn workspaces focus --production;

ENV COREPACK_ENABLE_NETWORK=0
ENV YARN_ENABLE_OFFLINE_MODE=1

USER appuser
ENTRYPOINT [ "/opt/test-runner/bin/run.sh" ]
2 changes: 0 additions & 2 deletions bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ result_file="${OUTPUT}results.json"
# Check yarn
if test -f "$ROOT/corepack.tgz"; then
YARN_ENABLE_OFFLINE_MODE=1 yarn -v
COREPACK_ENABLE_NETWORK=0 corepack enable
YARN_ENABLE_OFFLINE_MODE=1 yarn -v

# COREPACK_ENABLE_NETWORK=0 corepack install -g "$ROOT/corepack.tgz"
else
Expand Down

0 comments on commit 6dbfec4

Please sign in to comment.