Skip to content

Commit 89af397

Browse files
authored
feat: add Docker bionic (#1194)
1 parent 93c60af commit 89af397

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

utils/docker/Dockerfile.bionic

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
FROM ubuntu:bionic
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
ARG TZ=America/Los_Angeles
5+
6+
# === INSTALL Python ===
7+
8+
RUN apt-get update && \
9+
# Install Python
10+
apt-get install -y python3 python3-distutils curl && \
11+
update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \
12+
curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
13+
python get-pip.py && \
14+
rm get-pip.py && \
15+
# Feature-parity with node.js base images.
16+
apt-get install -y --no-install-recommends git openssh-client && \
17+
# clean apt cache
18+
rm -rf /var/lib/apt/lists/* && \
19+
# Create the pwuser
20+
adduser pwuser
21+
22+
# === BAKE BROWSERS INTO IMAGE ===
23+
24+
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
25+
26+
# 1. Add tip-of-tree Playwright package to install its browsers.
27+
# The package should be built beforehand from tip-of-tree Playwright.
28+
COPY ./dist/*-manylinux*.whl /tmp/
29+
30+
# 2. Bake in browsers & deps.
31+
# Browsers will be downloaded in `/ms-playwright`.
32+
# Note: make sure to set 777 to the registry so that any user can access
33+
# registry.
34+
RUN mkdir /ms-playwright && \
35+
mkdir /ms-playwright-agent && \
36+
cd /ms-playwright-agent && \
37+
# if its amd64 then install the manylinux1_x86_64 pip package
38+
if [ "$(uname -m)" = "x86_64" ]; then pip install /tmp/*manylinux1_x86_64*.whl; fi && \
39+
# if its arm64 then install the manylinux1_aarch64 pip package
40+
if [ "$(uname -m)" = "aarch64" ]; then pip install /tmp/*manylinux_2_17_aarch64*.whl; fi && \
41+
playwright install --with-deps && rm -rf /var/lib/apt/lists/* && \
42+
rm /tmp/*.whl && \
43+
rm -rf /ms-playwright-agent && \
44+
chmod -R 777 /ms-playwright

utils/docker/publish_docker.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ publish_docker_manifest () {
113113
done
114114
}
115115

116+
publish_docker_images_with_arch_suffix bionic amd64
117+
publish_docker_manifest bionic amd64
118+
116119
publish_docker_images_with_arch_suffix focal amd64
117120
publish_docker_images_with_arch_suffix focal arm64
118121
publish_docker_manifest focal amd64 arm64

0 commit comments

Comments
 (0)