Skip to content

Commit

Permalink
Cherry pick PR #4141: [Docker] Fix base container alias (#4146)
Browse files Browse the repository at this point in the history
Refer to the original PR: #4141

Switches the container base image url to a supported alias.

b/369130578

---------

Co-authored-by: Kaido Kert <[email protected]>
  • Loading branch information
cobalt-github-releaser-bot and kaidokert authored Sep 23, 2024
1 parent a1fc08f commit 5102563
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
7 changes: 5 additions & 2 deletions .github/actions/docker/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
22 changes: 13 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -105,7 +106,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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/linux/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5102563

Please sign in to comment.