Skip to content

feat: introduce docker integration#16382

Merged
aslushnikov merged 15 commits into
microsoft:mainfrom
aslushnikov:introduce-docker-integration
Sep 9, 2022
Merged

feat: introduce docker integration#16382
aslushnikov merged 15 commits into
microsoft:mainfrom
aslushnikov:introduce-docker-integration

Conversation

@aslushnikov
Copy link
Copy Markdown
Contributor

This patch introduces the following commands:

  • npx playwright install docker-image that builds a VRT docker image
    locally that is based off the mcr.microsoft.com/playwright:focal
  • npx playwright start-docker that launches a docker container with
    browsers.
  • npx playwright stop-docker that stops given docker container.
  • npx playwright test --docker that runs all the tests inside a
    launched docker container.

@rwoll
Copy link
Copy Markdown
Member

rwoll commented Aug 9, 2022

@aslushnikov When we add docs, make sure we tell people to increase default CPU and mem limit on their docker install (https://playwright.slack.com/archives/C01AG7QGW2F/p1659463173880389?thread_ts=1659428827.669649&cid=C01AG7QGW2F) otherwise they'll likely hit unexpected perf issues if they have a freshly installed Docker-for-Desktop.

@aslushnikov aslushnikov force-pushed the introduce-docker-integration branch from 5df033d to 8a9cb3d Compare August 9, 2022 16:29
@mxschmitt mxschmitt force-pushed the main branch 2 times, most recently from 34dd80c to 5578b86 Compare August 11, 2022 08:03
Comment thread packages/playwright-core/src/cli/docker.ts Outdated
Comment thread packages/playwright-core/src/cli/docker.ts Outdated
@rwoll
Copy link
Copy Markdown
Member

rwoll commented Aug 15, 2022

Can you add user docs (either directly here or in another PR) and then I'll review both docs and impl in one?

@aslushnikov aslushnikov force-pushed the introduce-docker-integration branch 2 times, most recently from c25c957 to 0a3e7ca Compare September 1, 2022 12:28
@aslushnikov aslushnikov force-pushed the introduce-docker-integration branch from 3b06d19 to add84ca Compare September 6, 2022 05:22
Comment thread packages/playwright-core/src/cli/docker.ts Outdated
Comment thread packages/playwright-core/src/cli/docker.ts Outdated
Comment thread packages/playwright-core/src/cli/docker.ts Outdated
Comment thread packages/playwright-core/src/cli/docker.ts Outdated
Comment thread docs/src/docker.md
Comment thread docs/src/docker.md
This patch introduces the following commands:
- `npx playwright docker build` that builds a VRT docker image
  locally that is based off the `mcr.microsoft.com/playwright:jammy`
- `npx playwright docker start` that launches a docker container with
  browsers.
- `npx playwright docker stop` that stops given docker container.
- `npx playwright docker test` that runs all the tests inside a
  launched docker container.
@aslushnikov aslushnikov force-pushed the introduce-docker-integration branch from ce77898 to c910a9b Compare September 8, 2022 16:10
@mxschmitt mxschmitt force-pushed the introduce-docker-integration branch from 55e96f2 to 7f20c79 Compare September 8, 2022 16:46
Comment thread tests/installation/docker-integration.spec.ts
Comment thread packages/playwright-test/src/index.ts Outdated
Comment thread packages/playwright-test/src/index.ts Outdated
Comment thread packages/playwright-test/src/cli.ts Outdated
Comment thread packages/playwright-core/package.json Outdated
Comment thread packages/playwright-core/src/cli/docker.ts Outdated
Comment thread packages/playwright-core/src/cli/docker.ts Outdated
Comment thread packages/playwright-core/src/cli/docker.ts Outdated
Comment thread packages/playwright-core/src/cli/docker.ts Outdated
Comment thread packages/playwright-core/src/cli/docker.ts
@aslushnikov
Copy link
Copy Markdown
Contributor Author

Note for self: also add docker desktop recommended settings that @rwoll recommended

Comment thread docs/src/docker.md Outdated
Comment thread docs/src/docker.md Outdated
Comment thread docs/src/docker.md Outdated
Comment thread docs/src/docker.md Outdated
Comment thread docs/src/docker.md Outdated
Comment thread docs/src/docker.md Outdated
Comment thread docs/src/docker.md
Comment thread packages/playwright-core/src/cli/docker.ts
Comment thread packages/playwright-core/src/cli/docker.ts
Comment thread utils/docker/Dockerfile.jammy Outdated
});
});

test('make sure it tells to run `npx playwright docker build` when image is not instaleld', async ({ exec }) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
test('make sure it tells to run `npx playwright docker build` when image is not instaleld', async ({ exec }) => {
test('make sure it tells to run `npx playwright docker build` when image is not installed', async ({ exec }) => {

@aslushnikov aslushnikov merged commit af042be into microsoft:main Sep 9, 2022
@aslushnikov aslushnikov deleted the introduce-docker-integration branch September 9, 2022 22:25
aslushnikov added a commit that referenced this pull request Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants