Skip to content

Commit

Permalink
Update docker-compose.yml with origin/main version
Browse files Browse the repository at this point in the history
This version of the docker file brings the 24.lts version in sync with
Main's version. This will enable building 24.lts images with
Docker-in-Docker.

b/339046920

This commit squashes changes from these bugs:
b/333270679
b/266761312
b/335357085
b/323184809
b/268244534
b/297387435
b/289252639
b/264712142
b/297387435
b/297387435
b/245490832
b/245490832
b/295919088
  • Loading branch information
arjungm committed Aug 14, 2024
1 parent f514f84 commit 3e946e5
Showing 1 changed file with 78 additions and 105 deletions.
183 changes: 78 additions & 105 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 All @@ -39,25 +40,17 @@ x-shared-build-env: &shared-build-env
IS_CI: ${IS_CI:-0}
IS_DOCKER: 1
PYTHONPATH: /code

x-shared-docsite-definitions: &shared-docsite-definitions
<<: *build-common-definitions
build:
context: ./docker/docsite
dockerfile: Dockerfile
args:
- USER=root
- UID=2000
- GID=2000
environment:
<<: *shared-build-env
TERM: xterm

x-shared-unittest-definitions: &shared-unittest-definitions
stdin_open: true
tty: true
build:
context: ./docker/linux
dockerfile: unittest/Dockerfile
args:
- CLANG_VER=${CLANG_VER:-365097-f7e52fbd-8}
- COBALT_CLANG_VER=${COBALT_CLANG_VER:-17-init-8029-g27f27d15-3}
image: cobalt-linux-x64x11-unittest
environment:
- PLATFORM=${PLATFORM:-linux-x64x11}
Expand Down Expand Up @@ -92,6 +85,21 @@ services:
depends_on:
- base

crashpad-symbolize:
build:
args:
- GITHUB_TAG=${GITHUB_TAG:-24.lts.30}
- ARCHITECTURE=${ARCHITECTURE:-arm64}
- SB_API_VERSION=${SB_API_VERSION:-15}
- CONFIG=${CONFIG:-qa}
context: ./docker/crashpad_symbolize
dockerfile: Dockerfile
image: crashpad-symbolize
volumes:
- ${MINIDUMP_PATH:-./minidump.dmp}:/root/minidump_directory/minidump.dmp
depends_on:
- base

#### Cobalt build containers
base:
build:
Expand Down Expand Up @@ -120,6 +128,7 @@ services:
args:
# Should match version pinned by Starboard
- CLANG_VER=${CLANG_VER:-365097-f7e52fbd-8}
- COBALT_CLANG_VER=${COBALT_CLANG_VER:-17-init-8029-g27f27d15-3}
image: cobalt-build-base
depends_on:
- base
Expand All @@ -132,23 +141,12 @@ services:
args:
- FROM_IMAGE=base-bionic
- CLANG_VER=${CLANG_VER:-365097-f7e52fbd-8}
- COBALT_CLANG_VER=${COBALT_CLANG_VER:-17-init-8029-g27f27d15-3}
image: build-base-bionic
depends_on:
- base-bionic
scale: 0

docsite:
<<: *shared-docsite-definitions
image: cobalt-build-docsite
ports:
# The docsite webapp runs on port 4000.
- "4000:4000"

docsite-deploy:
<<: *shared-docsite-definitions
image: cobalt-build-docsite-deploy
entrypoint: ["/code/third_party/internal/repo-publishing-toolkit-local/preview-site.sh", "deploy"]

build-linux-stub:
<<: *build-common-definitions
build:
Expand All @@ -170,6 +168,7 @@ services:
<<: *shared-build-env
PLATFORM: stub
CONFIG: ${CONFIG:-debug}
SB_API_VERSION: ${SB_API_VERSION}

build-linux:
<<: *build-common-definitions
Expand All @@ -190,13 +189,15 @@ services:
depends_on: [ build-base ]
environment:
<<: *shared-build-env
PLATFORM: linux-x64x11
PLATFORM: ${PLATFORM:-linux-x64x11}
CONFIG: ${CONFIG:-debug}
TARGET: ${TARGET:-cobalt_install}
SB_API_VERSION: ${SB_API_VERSION}

linux-x64x11-bionic:
<<: *common-definitions
<<: *build-volumes
<<:
- *common-definitions
- *build-volumes
build:
context: ./docker/linux
dockerfile: linux-x64x11/Dockerfile
Expand All @@ -208,8 +209,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 @@ -218,12 +220,14 @@ services:
<<: *shared-build-env
PLATFORM: linux-x64x11-gcc-6-3
CONFIG: ${CONFIG:-debug}
SB_API_VERSION: ${SB_API_VERSION}
depends_on:
- linux-x64x11-bionic

build-linux-gcc:
<<: *common-definitions
<<: *build-volumes
<<:
- *common-definitions
- *build-volumes
build:
context: ./docker/linux
dockerfile: gcc-6-3/Dockerfile
Expand All @@ -232,8 +236,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 All @@ -242,12 +247,14 @@ services:
<<: *shared-build-env
PLATFORM: linux-x64x11-clang-3-9
CONFIG: ${CONFIG:-debug}
SB_API_VERSION: ${SB_API_VERSION}
depends_on:
- linux-x64x11-bionic

build-linux-clang-3-9:
<<: *common-definitions
<<: *build-volumes
<<:
- *common-definitions
- *build-volumes
build:
context: ./docker/linux/
dockerfile: clang-3-9/Dockerfile
Expand All @@ -273,6 +280,7 @@ services:
PLATFORM: android-x86
CONFIG: ${CONFIG:-debug}
TARGET_CPU: ${TARGET_CPU:-x86}
SB_API_VERSION: ${SB_API_VERSION}

android-arm:
<<: *build-common-definitions
Expand All @@ -283,6 +291,7 @@ services:
PLATFORM: android-arm
CONFIG: ${CONFIG:-debug}
TARGET_CPU: ${TARGET_CPU:-arm}
SB_API_VERSION: ${SB_API_VERSION}

android-arm64:
<<: *build-common-definitions
Expand All @@ -293,6 +302,7 @@ services:
PLATFORM: android-arm64
CONFIG: ${CONFIG:-debug}
TARGET_CPU: ${TARGET_CPU:-arm64}
SB_API_VERSION: ${SB_API_VERSION}

build-raspi:
<<: *build-common-definitions
Expand All @@ -313,6 +323,7 @@ services:
<<: *shared-build-env
PLATFORM: ${PLATFORM:-raspi-2}
CONFIG: ${CONFIG:-debug}
SB_API_VERSION: ${SB_API_VERSION}

# Define common build container for Evergreen
build-evergreen:
Expand All @@ -333,35 +344,7 @@ services:
<<: *shared-build-env
PLATFORM: evergreen-x64
TARGET_CPU: ${TARGET_CPU:-x64}

evergreen-x64-sbversion-12:
<<: *build-common-definitions
image: cobalt-build-evergreen
depends_on: [ build-evergreen ]
environment:
<<: *shared-build-env
PLATFORM: evergreen-x64-sbversion-12
TARGET_CPU: ${TARGET_CPU:-x64}
SB_API_VERSION: 12

evergreen-x86:
<<: *build-common-definitions
image: cobalt-build-evergreen
depends_on: [ build-evergreen ]
environment:
<<: *shared-build-env
PLATFORM: evergreen-x86
TARGET_CPU: ${TARGET_CPU:-x86}

evergreen-x86-sbversion-12:
<<: *build-common-definitions
image: cobalt-build-evergreen
depends_on: [ build-evergreen ]
environment:
<<: *shared-build-env
PLATFORM: evergreen-x86-sbversion-12
TARGET_CPU: ${TARGET_CPU:-x86}
SB_API_VERSION: 12
SB_API_VERSION: ${SB_API_VERSION}

evergreen-arm64:
<<: *build-common-definitions
Expand All @@ -371,16 +354,7 @@ services:
<<: *shared-build-env
PLATFORM: evergreen-arm64
TARGET_CPU: ${TARGET_CPU:-arm64}

evergreen-arm64-sbversion-12:
<<: *build-common-definitions
image: cobalt-build-evergreen
depends_on: [ build-evergreen ]
environment:
<<: *shared-build-env
PLATFORM: evergreen-arm64-sbversion-12
TARGET_CPU: ${TARGET_CPU:-arm64}
SB_API_VERSION: 12
SB_API_VERSION: ${SB_API_VERSION}

evergreen-arm-hardfp:
<<: *build-common-definitions
Expand All @@ -390,16 +364,7 @@ services:
<<: *shared-build-env
PLATFORM: evergreen-arm-hardfp
TARGET_CPU: ${TARGET_CPU:-arm}

evergreen-arm-hardfp-sbversion-12:
<<: *build-common-definitions
image: cobalt-build-evergreen
depends_on: [ build-evergreen ]
environment:
<<: *shared-build-env
PLATFORM: evergreen-arm-hardfp-sbversion-12
TARGET_CPU: ${TARGET_CPU:-arm}
SB_API_VERSION: 12
SB_API_VERSION: ${SB_API_VERSION}

evergreen-arm-softfp:
<<: *build-common-definitions
Expand All @@ -409,47 +374,56 @@ services:
<<: *shared-build-env
PLATFORM: evergreen-arm-softfp
TARGET_CPU: ${TARGET_CPU:-arm}
SB_API_VERSION: ${SB_API_VERSION}

evergreen-arm-softfp-sbversion-12:
# Defined common build image for linux-evergreen
build-linux-evergreen:
<<: *build-common-definitions
image: cobalt-build-evergreen
build:
context: ./docker/linux
dockerfile: linux-x64x11/Dockerfile
args:
- FROM_IMAGE=cobalt-build-evergreen
image: cobalt-build-linux-evergreen
depends_on: [ build-evergreen ]
environment:
<<: *shared-build-env
PLATFORM: evergreen-arm-softfp-sbversion-12
TARGET_CPU: ${TARGET_CPU:-arm}
SB_API_VERSION: 12

# Defined common build image for linux-evergreen
build-linux-evergreen:
linux-x64x11-evergreen:
<<: *build-common-definitions
build:
context: ./docker/linux
dockerfile: linux-x64x11/Dockerfile
args:
- FROM_IMAGE=cobalt-build-evergreen
image: cobalt-build-linux-evergreen
image: cobalt-build-linux-x64x11-evergreen
depends_on: [ build-evergreen ]
environment:
<<: *shared-build-env
PLATFORM: linux-x64x11
CONFIG: ${CONFIG:-debug}
SB_API_VERSION: ${SB_API_VERSION}

linux-x64x11-sbversion12-evergreen:
# Defined common build image for android-evergreen
build-android-evergreen:
<<: *build-common-definitions
image: cobalt-build-linux-evergreen
depends_on: [ build-linux-evergreen ]
build:
context: ./docker/linux
dockerfile: android/Dockerfile
args:
- FROM_IMAGE=cobalt-build-evergreen
image: cobalt-build-android-evergreen
depends_on: [ build-evergreen ]
environment:
<<: *shared-build-env
PLATFORM: linux-x64x11-sbversion-12
CONFIG: ${CONFIG:-debug}
SB_API_VERSION: 12

# Example usage of unittest:
# 1. Build the containers for which you want to unittest
# docker-compose up --build --no-start linux-x64x11 unittest
# docker compose up --build --no-start linux-x64x11-unittest
# 2. Build the 'all' target for the platform you want to test
# PLATFORM=linux-x64x11 CONFIG=devel TARGET=all docker-compose run linux-x64x11
# PLATFORM=linux-x64x11 CONFIG=devel TARGET=all docker compose run linux-x64x11
# 3. Run the unittests for that target.
# PLATFORM=linux-x64x11 CONFIG=devel TARGET=all docker-compose run unittest
# PLATFORM=linux-x64x11 CONFIG=devel docker compose run linux-x64x11-unittest
linux-x64x11-unittest:
<<: *shared-unittest-definitions

Expand Down Expand Up @@ -480,10 +454,9 @@ services:
entrypoint: ["python3", "/unittest_docker_launcher.py", "3"]

xvfb:
image: xvfb
image: cobalt-xvfb
ports:
- "99:99"
image: cobalt-xvfb
build:
context: ./docker/linux/
dockerfile: xvfb/Dockerfile
Expand Down

0 comments on commit 3e946e5

Please sign in to comment.