Skip to content

Commit 186aede

Browse files
authored
devops: use wget for driver downloads (#1679)
1 parent db52fa9 commit 186aede

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

scripts/download_driver.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ do
4545
fi
4646
URL=$URL/$FILE_NAME
4747
echo "Using url: $URL"
48-
curl -O $URL
48+
# Ubuntu 24.04-arm64 emulated via qemu has a bug, so we prefer wget over curl.
49+
# See https://github.com/microsoft/playwright-java/issues/1678.
50+
if command -v wget &> /dev/null; then
51+
wget $URL
52+
else
53+
curl -O $URL
54+
fi
4955
unzip $FILE_NAME -d .
5056
rm $FILE_NAME
5157

utils/docker/Dockerfile.focal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARG DOCKER_IMAGE_NAME_TEMPLATE="mcr.microsoft.com/playwright/java:v%version%-foc
99
RUN apt-get update && \
1010
apt-get install -y --no-install-recommends openjdk-21-jdk \
1111
# Install utilities required for downloading browsers
12-
curl \
12+
wget \
1313
# Install utilities required for downloading driver
1414
unzip \
1515
# For the MSEdge install script
@@ -21,7 +21,7 @@ RUN apt-get update && \
2121
# Ubuntu 22.04 and earlier come with Maven 3.6.3 which fails with
2222
# Java 21, so we install latest Maven from Apache instead.
2323
RUN VERSION=3.9.6 && \
24-
curl -o - https://archive.apache.org/dist/maven/maven-3/$VERSION/binaries/apache-maven-$VERSION-bin.tar.gz | tar zxfv - -C /opt/ && \
24+
wget -O - https://archive.apache.org/dist/maven/maven-3/$VERSION/binaries/apache-maven-$VERSION-bin.tar.gz | tar zxfv - -C /opt/ && \
2525
ln -s /opt/apache-maven-$VERSION/bin/mvn /usr/local/bin/
2626

2727
ARG PW_TARGET_ARCH

utils/docker/Dockerfile.jammy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARG DOCKER_IMAGE_NAME_TEMPLATE="mcr.microsoft.com/playwright/java:v%version%-jam
99
RUN apt-get update && \
1010
apt-get install -y --no-install-recommends openjdk-21-jdk \
1111
# Install utilities required for downloading browsers
12-
curl \
12+
wget \
1313
# Install utilities required for downloading driver
1414
unzip \
1515
# For the MSEdge install script
@@ -21,7 +21,7 @@ RUN apt-get update && \
2121
# Ubuntu 22.04 and earlier come with Maven 3.6.3 which fails with
2222
# Java 21, so we install latest Maven from Apache instead.
2323
RUN VERSION=3.9.6 && \
24-
curl -o - https://archive.apache.org/dist/maven/maven-3/$VERSION/binaries/apache-maven-$VERSION-bin.tar.gz | tar zxfv - -C /opt/ && \
24+
wget -O - https://archive.apache.org/dist/maven/maven-3/$VERSION/binaries/apache-maven-$VERSION-bin.tar.gz | tar zxfv - -C /opt/ && \
2525
ln -s /opt/apache-maven-$VERSION/bin/mvn /usr/local/bin/
2626

2727
ARG PW_TARGET_ARCH

utils/docker/Dockerfile.noble

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARG DOCKER_IMAGE_NAME_TEMPLATE="mcr.microsoft.com/playwright/java:v%version%-nob
99
RUN apt-get update && \
1010
apt-get install -y --no-install-recommends openjdk-21-jdk \
1111
# Install utilities required for downloading browsers
12-
curl \
12+
wget \
1313
# Install utilities required for downloading driver
1414
unzip \
1515
# For the MSEdge install script
@@ -21,7 +21,7 @@ RUN apt-get update && \
2121
# Ubuntu 22.04 and earlier come with Maven 3.6.3 which fails with
2222
# Java 21, so we install latest Maven from Apache instead.
2323
RUN VERSION=3.9.6 && \
24-
curl -o - https://archive.apache.org/dist/maven/maven-3/$VERSION/binaries/apache-maven-$VERSION-bin.tar.gz | tar zxfv - -C /opt/ && \
24+
wget -O - https://archive.apache.org/dist/maven/maven-3/$VERSION/binaries/apache-maven-$VERSION-bin.tar.gz | tar zxfv - -C /opt/ && \
2525
ln -s /opt/apache-maven-$VERSION/bin/mvn /usr/local/bin/
2626

2727
ARG PW_TARGET_ARCH

0 commit comments

Comments
 (0)