Skip to content

Commit

Permalink
Merge pull request #1688 from docsifyjs/docker-local
Browse files Browse the repository at this point in the history
test: for making test steady in docker locally.
  • Loading branch information
trusktr authored Jan 4, 2022
2 parents 40e7749 + aa91d9e commit 5cac06d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM mcr.microsoft.com/playwright:focal
WORKDIR /app
COPY . .
RUN rm package-lock.json
RUN npm install
RUN npx playwright install
RUN npm run build
ENTRYPOINT ["npm", "run"]
CMD ["test"]
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@
"prepare": "npm run build",
"pub:next": "cross-env RELEASE_TAG=next sh build/release.sh",
"pub": "sh build/release.sh",
"postinstall": "opencollective-postinstall"
"postinstall": "opencollective-postinstall",
"docker:build": "docker build -f Dockerfile -t docsify-test:local .",
"docker:clean": "docker rmi docsify-test:local",
"docker:rebuild": "npm run docker:clean && npm run docker:build",
"docker:test": "docker run --rm -it --ipc=host --mount type=bind,source=$(pwd)/test,target=/app/test docsify-test:local test",
"docker:test:e2e": "docker run --rm -it --ipc=host --mount type=bind,source=$(pwd)/test,target=/app/test docsify-test:local test:e2e",
"docker:test:integration": "docker run --rm -it --ipc=host --mount type=bind,source=$(pwd)/test,target=/app/test docsify-test:local test:integration",
"docker:test:unit": "docker run --rm -it --ipc=host --mount type=bind,source=$(pwd)/test,target=/app/test docsify-test:local test:unit"
},
"husky": {
"hooks": {
Expand Down

1 comment on commit 5cac06d

@vercel
Copy link

@vercel vercel bot commented on 5cac06d Jan 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.