docs(docker): update to use official image (#2760)
This commit is contained in:
parent
28a9f55a49
commit
69127ad8d3
|
|
@ -85,7 +85,7 @@ For Linux agents, you can use [our Docker container](docker/README.md) with Azur
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-18.04'
|
vmImage: 'ubuntu-18.04'
|
||||||
|
|
||||||
container: aslushnikov/playwright:bionic
|
container: mcr.microsoft.com/playwright:bionic
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- script: npm install
|
- script: npm install
|
||||||
|
|
@ -151,7 +151,7 @@ We run our tests on CircleCI, with our [pre-built Docker image](docker/README.md
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
docker:
|
docker:
|
||||||
- image: aslushnikov/playwright:bionic
|
- image: mcr.microsoft.com/playwright:bionic
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: development # Needed if playwright is in `devDependencies`
|
NODE_ENV: development # Needed if playwright is in `devDependencies`
|
||||||
```
|
```
|
||||||
|
|
@ -175,7 +175,7 @@ We run our tests on Windows agents in AppVeyor. Use our [AppVeyor configuration]
|
||||||
Bitbucket Pipelines can use public [Docker images as build environments](https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html). To run Playwright tests on Bitbucket, use our public Docker image ([see Dockerfile](docker/README.md)).
|
Bitbucket Pipelines can use public [Docker images as build environments](https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html). To run Playwright tests on Bitbucket, use our public Docker image ([see Dockerfile](docker/README.md)).
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
image: aslushnikov/playwright:bionic
|
image: mcr.microsoft.com/playwright:bionic
|
||||||
```
|
```
|
||||||
|
|
||||||
While the Docker image supports sandboxing for Chromium, it does not work in the Bitbucket Pipelines environment. To launch Chromium on Bitbucket Pipelines, use the `--no-sandbox` launch argument.
|
While the Docker image supports sandboxing for Chromium, it does not work in the Bitbucket Pipelines environment. To launch Chromium on Bitbucket Pipelines, use the `--no-sandbox` launch argument.
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,65 @@
|
||||||
This image includes all the dependencies needed to run browsers in a Docker
|
This image includes all the dependencies needed to run browsers in a Docker
|
||||||
container.
|
container.
|
||||||
|
|
||||||
Building image:
|
<!-- GEN:toc -->
|
||||||
|
- [Usage](#usage)
|
||||||
|
* [Pull the image](#pull-the-image)
|
||||||
|
* [Run the image](#run-the-image)
|
||||||
|
* [Using on CI](#using-on-ci)
|
||||||
|
- [Development](#development)
|
||||||
|
* [Build the image](#build-the-image)
|
||||||
|
* [Push](#push)
|
||||||
|
- [Base images](#base-images)
|
||||||
|
* [Alpine](#alpine)
|
||||||
|
<!-- GEN:stop -->
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
[](https://hub.docker.com/_/microsoft-playwright)
|
||||||
|
|
||||||
|
This image is published on [Docker Hub](https://hub.docker.com/_/microsoft-playwright).
|
||||||
|
|
||||||
|
### Pull the image
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo docker build -t microsoft/playwright:bionic -f Dockerfile.bionic .
|
$ docker pull mcr.microsoft.com/playwright:bionic
|
||||||
```
|
```
|
||||||
|
|
||||||
Running image:
|
### Run the image
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo docker container run -it --rm --ipc=host --security-opt seccomp=chrome.json microsoft/playwright:bionic /bin/bash
|
$ docker container run -it --rm --ipc=host --security-opt seccomp=chrome.json mcr.microsoft.com/playwright:bionic /bin/bash
|
||||||
```
|
```
|
||||||
|
|
||||||
> **NOTE**: The seccomp profile is coming from Jessie Frazelle. It's needed
|
Note that:
|
||||||
> to run Chrome without sandbox.
|
|
||||||
> Using `--ipc=host` is also recommended when using Chrome. Without it Chrome can run out of memory and crash.
|
|
||||||
> [See the docker documentation for this option here.](https://docs.docker.com/engine/reference/run/#ipc-settings---ipc)
|
|
||||||
|
|
||||||
## Playwright on Alpine
|
* The seccomp profile is required to run Chrome without sandbox. Thanks to [Jessie Frazelle](https://github.com/jessfraz/dotfiles/blob/master/etc/docker/seccomp/chrome.json).
|
||||||
|
* Using `--ipc=host` is also recommended when using Chrome ([Docker docs](https://docs.docker.com/engine/reference/run/#ipc-settings---ipc)). Chrome can run out of memory without this flag.
|
||||||
|
|
||||||
|
### Using on CI
|
||||||
|
|
||||||
|
See our [Continuous Integration guides](../ci.md) for sample configs.
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
### Build the image
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker build -t mcr.microsoft.com/playwright:bionic -f Dockerfile.bionic .
|
||||||
|
```
|
||||||
|
|
||||||
|
### Push
|
||||||
|
|
||||||
|
Playwright on Docker Hub relies on
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker push playwright.azurecr.io/public/playwright:bionic
|
||||||
|
```
|
||||||
|
|
||||||
|
## Base images
|
||||||
|
|
||||||
|
`playwright:bionic` is based on Ubuntu 18.04 LTS (Bionic Beaver).
|
||||||
|
|
||||||
|
### Alpine
|
||||||
|
|
||||||
Browser builds for Firefox and WebKit are built for the [glibc](https://en.wikipedia.org/wiki/GNU_C_Library) library. Alpine Linux and other distributions that are based on the [musl](https://en.wikipedia.org/wiki/Musl) standard library are not supported.
|
Browser builds for Firefox and WebKit are built for the [glibc](https://en.wikipedia.org/wiki/GNU_C_Library) library. Alpine Linux and other distributions that are based on the [musl](https://en.wikipedia.org/wiki/Musl) standard library are not supported.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue