mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 21:53:35 +03:00
becdccdf03
Each Ubuntu and Debian release has a code name. Ubuntu 18(bionic), Ubuntu 20(focal). This adds the Dockerfile for Ubuntu20. Next steps and follow up changes: - add it to the devops site, so we are sure all tests are passing, locally they did - deploy it to the MCR, naming needs to be clarified, probably just as "focal". This naming schema allows us in the future to add Debian support too. But we should wait until Headless WK is fixed. Relates #3791 Relates #2758 Closes #3338
31 lines
893 B
Bash
Executable File
31 lines
893 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
set +x
|
|
|
|
if [[ ($1 == '--help') || ($1 == '-h') || ($1 == '') || ($2 == '') ]]; then
|
|
echo "usage: $(basename $0) {bionic,focal} playwright:localbuild-bionic"
|
|
echo
|
|
echo "Build Playwright docker image and tag it as 'playwright:localbuild-bionic'."
|
|
echo "Once image is built, you can run it with"
|
|
echo ""
|
|
echo " docker run --rm -it playwright:localbuildbionic /bin/bash"
|
|
echo ""
|
|
echo "NOTE: this requires on Playwright dependencies to be installed with 'npm install'"
|
|
echo " and Playwright itself being built with 'npm run build'"
|
|
echo ""
|
|
exit 0
|
|
fi
|
|
|
|
function cleanup() {
|
|
rm -f "playwright.tar.gz"
|
|
}
|
|
|
|
trap "cleanup; cd $(pwd -P)" EXIT
|
|
cd "$(dirname "$0")"
|
|
|
|
# We rely on `./playwright.tar.gz` to download browsers into the docker
|
|
# image.
|
|
node ../../packages/build_package.js playwright ./playwright.tar.gz
|
|
|
|
docker build -t "$2" -f "Dockerfile.$1" .
|