Skip to content

Commit e3f2f6f

Browse files
authored
fix(docker): assemble driver on the host for docker builds (#1930)
1 parent 1b7d164 commit e3f2f6f

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

utils/docker/Dockerfile.jammy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ RUN mkdir /ms-playwright && \
4444
COPY . /tmp/pw-java
4545

4646
RUN cd /tmp/pw-java && \
47-
./scripts/download_driver.sh && \
4847
mvn install -D skipTests --no-transfer-progress && \
4948
DEBIAN_FRONTEND=noninteractive mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI \
5049
-D exec.args="install-deps" -f playwright/pom.xml --no-transfer-progress && \

utils/docker/Dockerfile.noble

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ RUN mkdir /ms-playwright && \
4444
COPY . /tmp/pw-java
4545

4646
RUN cd /tmp/pw-java && \
47-
./scripts/download_driver.sh && \
4847
mvn install -D skipTests --no-transfer-progress && \
4948
DEBIAN_FRONTEND=noninteractive mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI \
5049
-D exec.args="install-deps" -f playwright/pom.xml --no-transfer-progress && \

utils/docker/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@ fi
3434

3535
PW_TARGET_ARCH=$(echo $1 | cut -c3-)
3636

37+
# Assemble the driver on the host where npm is available; the Dockerfile picks
38+
# it up via `COPY . /tmp/pw-java`.
39+
../../scripts/download_driver.sh
40+
3741
docker build --platform "${PLATFORM}" --build-arg "PW_TARGET_ARCH=${PW_TARGET_ARCH}" -t "$3" -f "Dockerfile.$2" ../../

0 commit comments

Comments
 (0)