Skip to content

Commit 3392db9

Browse files
authored
feat(docker): add Ubuntu 26.04 (Resolute Raccoon) image (#3325)
1 parent b7b3675 commit 3392db9

4 files changed

Lines changed: 54 additions & 4 deletions

File tree

.github/workflows/test_docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
flavor: [noble]
27+
flavor: [noble, resolute]
2828
runs-on: [ubuntu-24.04, ubuntu-24.04-arm]
2929
steps:
3030
- uses: actions/checkout@v6

utils/docker/Dockerfile.resolute

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:10.0-resolute
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
ARG TZ=America/Los_Angeles
5+
ARG DOCKER_IMAGE_NAME_TEMPLATE="mcr.microsoft.com/playwright/dotnet:v%version%-resolute"
6+
7+
ENV LANG=C.UTF-8
8+
ENV LC_ALL=C.UTF-8
9+
10+
# === INSTALL dependencies ===
11+
12+
RUN apt-get update && \
13+
# Feature-parity with node.js base images.
14+
apt-get install -y --no-install-recommends git openssh-client curl gpg && \
15+
# clean apt cache
16+
rm -rf /var/lib/apt/lists/* && \
17+
# Create the pwuser
18+
useradd -m -s /bin/bash pwuser
19+
20+
# === BAKE BROWSERS INTO IMAGE ===
21+
22+
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
23+
24+
# 1. Add tip-of-tree Playwright package to install its browsers.
25+
# The package should be built beforehand from tip-of-tree Playwright.
26+
COPY ./dist/ /tmp/playwright-dotnet
27+
28+
# 2. Bake in browsers & deps.
29+
# Browsers will be downloaded in `/ms-playwright`.
30+
# Note: make sure to set 777 to the registry so that any user can access
31+
# registry.
32+
RUN mkdir /ms-playwright && \
33+
/tmp/playwright-dotnet/playwright.ps1 install --with-deps && \
34+
/tmp/playwright-dotnet/playwright.ps1 mark-docker-image "${DOCKER_IMAGE_NAME_TEMPLATE}" && \
35+
rm -rf /var/lib/apt/lists/* && \
36+
rm -rf /tmp/* && \
37+
chmod -R 777 /ms-playwright

utils/docker/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -e
33
set +x
44

55
if [[ ($1 == '--help') || ($1 == '-h') || ($1 == '') || ($2 == '') ]]; then
6-
echo "usage: $(basename $0) {--arm64,--amd64} {noble} playwright:localbuild-noble"
6+
echo "usage: $(basename $0) {--arm64,--amd64} {noble,resolute} playwright:localbuild-noble"
77
echo
88
echo "Build Playwright docker image and tag it as 'playwright:localbuild-noble'."
99
echo "Once image is built, you can run it with"

utils/docker/publish_docker.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ NOBLE_TAGS=(
2828
"v${PW_VERSION}-noble"
2929
)
3030

31+
# Ubuntu 26.04
32+
RESOLUTE_TAGS=(
33+
"v${PW_VERSION}-resolute"
34+
)
35+
3136
tag_and_push() {
3237
local source="$1"
3338
local target="$2"
@@ -62,8 +67,10 @@ publish_docker_images_with_arch_suffix() {
6267
local TAGS=()
6368
if [[ "$FLAVOR" == "noble" ]]; then
6469
TAGS=("${NOBLE_TAGS[@]}")
70+
elif [[ "$FLAVOR" == "resolute" ]]; then
71+
TAGS=("${RESOLUTE_TAGS[@]}")
6572
else
66-
echo "ERROR: unknown flavor - $FLAVOR. Must be 'noble'"
73+
echo "ERROR: unknown flavor - $FLAVOR. Must be 'noble' or 'resolute'"
6774
exit 1
6875
fi
6976
local ARCH="$2"
@@ -86,8 +93,10 @@ publish_docker_manifest () {
8693
local TAGS=()
8794
if [[ "$FLAVOR" == "noble" ]]; then
8895
TAGS=("${NOBLE_TAGS[@]}")
96+
elif [[ "$FLAVOR" == "resolute" ]]; then
97+
TAGS=("${RESOLUTE_TAGS[@]}")
8998
else
90-
echo "ERROR: unknown flavor - $FLAVOR. Must be 'noble'"
99+
echo "ERROR: unknown flavor - $FLAVOR. Must be 'noble' or 'resolute'"
91100
exit 1
92101
fi
93102

@@ -109,3 +118,7 @@ publish_docker_manifest () {
109118
publish_docker_images_with_arch_suffix noble amd64
110119
publish_docker_images_with_arch_suffix noble arm64
111120
publish_docker_manifest noble amd64 arm64
121+
122+
publish_docker_images_with_arch_suffix resolute amd64
123+
publish_docker_images_with_arch_suffix resolute arm64
124+
publish_docker_manifest resolute amd64 arm64

0 commit comments

Comments
 (0)