File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,13 @@ ARG DOCKER_IMAGE_NAME_TEMPLATE="mcr.microsoft.com/playwright/java:v%version%-foc
55# === INSTALL JDK and Maven ===
66
77RUN apt-get update && \
8+ # Install install jdk 17 in a separate apt-get command so that
9+ # installing maven doesn't bring in jdk 11
10+ apt-get install -y --no-install-recommends openjdk-17-jdk && \
811 apt-get install -y --no-install-recommends \
9- openjdk-17-jdk maven \
12+ # Ubuntu 22.04 and earlier come with Maven 3.6.3 which fails with
13+ # Java 17, so we install latest Maven from Apache instead.
14+ # maven \
1015 # Install utilities required for downloading browsers
1116 curl \
1217 # Install utilities required for downloading driver
@@ -17,8 +22,12 @@ RUN apt-get update && \
1722 # Create the pwuser
1823 adduser pwuser
1924
25+ RUN VERSION=3.8.6 && \
26+ curl -o - https://dlcdn.apache.org/maven/maven-3/$VERSION/binaries/apache-maven-$VERSION-bin.tar.gz | tar zxfv - -C /opt/ && \
27+ ln -s /opt/apache-maven-$VERSION/bin/mvn /usr/local/bin/
28+
2029ARG PW_TARGET_ARCH
21- ENV JAVA_HOME=/usr/lib/jvm/java-11 -openjdk-${PW_TARGET_ARCH}
30+ ENV JAVA_HOME=/usr/lib/jvm/java-17 -openjdk-${PW_TARGET_ARCH}
2231
2332# === BAKE BROWSERS INTO IMAGE ===
2433
You can’t perform that action at this time.
0 commit comments