Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions utils/docker/Dockerfile.focal
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ ARG DOCKER_IMAGE_NAME_TEMPLATE="mcr.microsoft.com/playwright/java:v%version%-foc
# === INSTALL JDK and Maven ===

RUN apt-get update && \
# Install install jdk 17 in a separate apt-get command so that
# installing maven doesn't bring in jdk 11
apt-get install -y --no-install-recommends openjdk-17-jdk && \
apt-get install -y --no-install-recommends \
openjdk-17-jdk maven \
# Ubuntu 22.04 and earlier come with Maven 3.6.3 which fails with
# Java 17, so we install latest Maven from Apache instead.
# maven \
# Install utilities required for downloading browsers
curl \
# Install utilities required for downloading driver
Expand All @@ -17,8 +22,12 @@ RUN apt-get update && \
# Create the pwuser
adduser pwuser

RUN VERSION=3.8.6 && \
curl -o - https://dlcdn.apache.org/maven/maven-3/$VERSION/binaries/apache-maven-$VERSION-bin.tar.gz | tar zxfv - -C /opt/ && \
ln -s /opt/apache-maven-$VERSION/bin/mvn /usr/local/bin/

ARG PW_TARGET_ARCH
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-${PW_TARGET_ARCH}
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-${PW_TARGET_ARCH}

# === BAKE BROWSERS INTO IMAGE ===

Expand Down