diff --git a/docker/dev/nodejs/Dockerfile b/docker/dev/nodejs/Dockerfile index ba9a1aa718..d1cdaeb70c 100755 --- a/docker/dev/nodejs/Dockerfile +++ b/docker/dev/nodejs/Dockerfile @@ -48,12 +48,16 @@ RUN npm install --only=production --no-audit --no-fund --prefer-offline --progre FROM base AS amd64 RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \ - apt-get update && apt-get install -yq google-chrome-stable libxss1 && \ + apt-get update && \ + (apt-get install -yq google-chrome-stable libxss1 || \ + (apt-get update && apt-get install -yq --fix-missing google-chrome-stable libxss1)) && \ rm -rf /var/lib/apt/lists/* # ARM64-specific stage FROM base AS arm64 -RUN apt-get update && apt-get install -yq chromium libxss1 && \ +RUN apt-get update && \ + (apt-get install -yq chromium libxss1 || \ + (apt-get update && apt-get install -yq --fix-missing chromium libxss1)) && \ ln -sf /usr/bin/chromium /usr/bin/google-chrome && \ rm -rf /var/lib/apt/lists/* diff --git a/docker/prod/nodejs/Dockerfile b/docker/prod/nodejs/Dockerfile index 4482dd0f69..b69b052ac7 100644 --- a/docker/prod/nodejs/Dockerfile +++ b/docker/prod/nodejs/Dockerfile @@ -46,7 +46,9 @@ RUN bower install --allow-root # Install Chrome for testing (if needed) RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \ - apt-get update && apt-get install -yq google-chrome-stable libxss1 && \ + apt-get update && \ + (apt-get install -yq google-chrome-stable libxss1 || \ + (apt-get update && apt-get install -yq --fix-missing google-chrome-stable libxss1)) && \ rm -rf /var/lib/apt/lists/* # Set Chrome environment variables for production