From f2472edfa8f4fac5e6baacdcc673c4bf7a39ac96 Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Fri, 29 Dec 2023 14:28:43 +0000 Subject: [PATCH] chore: symlink project dir in Docker This reduces the need to keep building the image between changes to test files --- Dockerfile | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e1c43fb..2238bc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,8 @@ WORKDIR /home/cypress-image-snapshot COPY . . -RUN corepack prepare yarn@3.5.0 --activate && \ +RUN corepack enable && \ + corepack prepare yarn@3.5.0 --activate && \ yarn set version 3.5.0 RUN yarn install RUN yarn build diff --git a/package.json b/package.json index 8076ef1..bc14ed0 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "lint:eslint": "eslint --ext .ts,.json .", "lint:commits": "commitlint --from=HEAD~$(git --no-pager rev-list origin/master..HEAD --count)", "docker:build": "docker build -t cypress-image-snapshot .", - "docker:run": "docker run -it --env CYPRESS_updateSnapshots --env CYPRESS_debugSnapshots -v ./cypress:/home/cypress-image-snapshot/cypress cypress-image-snapshot", + "docker:run": "docker run -it --env CYPRESS_updateSnapshots --env CYPRESS_debugSnapshots -v $PWD:/home/cypress-image-snapshot cypress-image-snapshot", "cypress:open": "cypress open --env debugSnapshots=true,failOnSnapshotDiff=false --browser electron --e2e", "cypress:run": "cypress run --browser electron", "cypress:server": "http-server -s -p 9001 -c-1 ./cypress/server &",