From c6a29011e56f4466b7af76ff8aba2732c5a94b67 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Wed, 3 Mar 2021 14:01:04 -0800 Subject: [PATCH] =?UTF-8?q?cherry-pick(release-1.9):=20fix=20registry=20to?= =?UTF-8?q?=20be=20accessible=20by=20Azure=20Pipe=E2=80=A6=20(#5704)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This cherry-picks f637b0302dd651e2e6310f13cba9998a2730ede0 and 59d9c1cae6f9505c280552b771ec671e825b368e References #5635 --- utils/docker/Dockerfile.bionic | 12 +++++++----- utils/docker/Dockerfile.focal | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/utils/docker/Dockerfile.bionic b/utils/docker/Dockerfile.bionic index ee068f0066..6fa91043a3 100644 --- a/utils/docker/Dockerfile.bionic +++ b/utils/docker/Dockerfile.bionic @@ -79,15 +79,17 @@ RUN apt-get update && apt-get install -y python3.8 python3-pip && \ ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright -RUN mkdir /ms-playwright && chmod 777 /ms-playwright - # 1. Add tip-of-tree Playwright package to install its browsers. # The package should be built beforehand from tip-of-tree Playwright. COPY ./playwright.tar.gz /tmp/playwright.tar.gz # 2. Install playwright and then delete the installation. # Browsers will remain downloaded in `/ms-playwright`. -RUN su pwuser -c "mkdir /tmp/pw && cd /tmp/pw && npm init -y && \ - npm i /tmp/playwright.tar.gz" && \ - rm -rf /tmp/pw && rm /tmp/playwright.tar.gz +# Note: make sure to set 777 to the registry so that any user can access +# registry. +RUN mkdir /ms-playwright && \ + mkdir /tmp/pw && cd /tmp/pw && npm init -y && \ + npm i /tmp/playwright.tar.gz && \ + rm -rf /tmp/pw && rm /tmp/playwright.tar.gz && \ + chmod -R 777 /ms-playwright diff --git a/utils/docker/Dockerfile.focal b/utils/docker/Dockerfile.focal index 8885de1c2c..795b9a12ca 100644 --- a/utils/docker/Dockerfile.focal +++ b/utils/docker/Dockerfile.focal @@ -78,15 +78,17 @@ RUN apt-get update && apt-get install -y python3.8 python3-pip && \ ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright -RUN mkdir /ms-playwright && chmod 777 /ms-playwright - # 1. Add tip-of-tree Playwright package to install its browsers. # The package should be built beforehand from tip-of-tree Playwright. COPY ./playwright.tar.gz /tmp/playwright.tar.gz # 2. Install playwright and then delete the installation. # Browsers will remain downloaded in `/ms-playwright`. -RUN su pwuser -c "mkdir /tmp/pw && cd /tmp/pw && npm init -y && \ - npm i /tmp/playwright.tar.gz" && \ - rm -rf /tmp/pw && rm /tmp/playwright.tar.gz +# Note: make sure to set 777 to the registry so that any user can access +# registry. +RUN mkdir /ms-playwright && \ + mkdir /tmp/pw && cd /tmp/pw && npm init -y && \ + npm i /tmp/playwright.tar.gz && \ + rm -rf /tmp/pw && rm /tmp/playwright.tar.gz && \ + chmod -R 777 /ms-playwright