From 33d4e99302033221f6eb49c8b817c4b37ffb60f3 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Mon, 23 Sep 2024 10:54:16 -0700 Subject: [PATCH 1/2] [Docker] Fix base container alias (#4141) Switches the container base image url to a supported alias. b/369130578 (cherry picked from commit 6c55b73523a37caee3c54a6af226ad73ae14aff4) --- .github/actions/docker/action.yaml | 7 +++++-- docker-compose.yml | 2 +- docker/linux/base/Dockerfile | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/actions/docker/action.yaml b/.github/actions/docker/action.yaml index d47c35f8556f..8b2942a45270 100644 --- a/.github/actions/docker/action.yaml +++ b/.github/actions/docker/action.yaml @@ -46,8 +46,11 @@ runs: run: echo "DOCKER_TAG=ghcr.io/${REPO}/${{inputs.docker_image}}:${GITHUB_BASE_REF%.1+}" >> $GITHUB_ENV shell: bash - name: Set up Cloud SDK - if: ${{ (steps.changed-files.outputs.any_changed == 'true') && (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.fork) }} - uses: google-github-actions/setup-gcloud@v1 + uses: isarkis/setup-gcloud@40dce7857b354839efac498d3632050f568090b6 # v1.1.1 + - name: Configure Docker auth for GCloud + shell: bash + run: | + gcloud auth configure-docker - name: Set Docker Tag id: set-docker-tag-presubmit-fork env: diff --git a/docker-compose.yml b/docker-compose.yml index d575bc31f564..74d358747565 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -105,7 +105,7 @@ services: base-bionic: build: args: - - BASE_OS=gcr.io/cloud-marketplace-containers/google/ubuntu1804 + - BASE_OS=marketplace.gcr.io/google/ubuntu1804 - BASE_OS_TAG=latest context: ./docker/linux dockerfile: base/Dockerfile diff --git a/docker/linux/base/Dockerfile b/docker/linux/base/Dockerfile index 849e6569bb19..76cafd410742 100644 --- a/docker/linux/base/Dockerfile +++ b/docker/linux/base/Dockerfile @@ -14,7 +14,7 @@ ARG BASE_OS ARG BASE_OS_TAG -FROM ${BASE_OS:-gcr.io/cloud-marketplace-containers/google/debian10}:${BASE_OS_TAG:-latest} +FROM ${BASE_OS:-marketplace.gcr.io/google/debian10}:${BASE_OS_TAG:-latest} COPY base/clean-after-apt.sh /opt/clean-after-apt.sh From d49a96d46f4109a7a4be70c8bfa6927d281da151 Mon Sep 17 00:00:00 2001 From: Kaido Kert Date: Mon, 23 Sep 2024 14:48:57 -0700 Subject: [PATCH 2/2] Cherrypick fixes --- docker-compose.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 74d358747565..0aaf23c431b1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,8 +29,9 @@ x-build-volumes: &build-volumes - ${CCACHE_DIR:-container-ccache}:/root/ccache x-build-common-definitions: &build-common-definitions - <<: *common-definitions - <<: *build-volumes + <<: + - *common-definitions + - *build-volumes depends_on: - build-base @@ -195,8 +196,9 @@ services: TARGET: ${TARGET:-cobalt_install} linux-x64x11-bionic: - <<: *common-definitions - <<: *build-volumes + <<: + - *common-definitions + - *build-volumes build: context: ./docker/linux dockerfile: linux-x64x11/Dockerfile @@ -208,8 +210,9 @@ services: scale: 0 linux-x64x11-gcc: - <<: *common-definitions - <<: *build-volumes + <<: + - *common-definitions + - *build-volumes build: context: ./docker/linux dockerfile: gcc-6-3/Dockerfile @@ -222,8 +225,9 @@ services: - linux-x64x11-bionic linux-x64x11-clang-3-9: - <<: *common-definitions - <<: *build-volumes + <<: + - *common-definitions + - *build-volumes build: context: ./docker/linux/ dockerfile: clang-3-9/Dockerfile