Fix sonic-mgmt docker build due to Bookworm changes (#17309)
* Fix sonic-mgmt docker build due to Bookworm changes Because of the Bookworm upgrade, when some build target is specified on the command line, the build system will try to build everything for buster and bullseye distros, even if it's not needed by the target. As a workaround, call the underlying Makefile.work script with `BLDENV=bullseye` to have it only build packages related to sonic-mgmt. Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Mark docker-sonic-mgmt as a Bullseye container Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> --------- Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
This commit is contained in:
parent
865f33c62d
commit
7c5f616469
@ -43,7 +43,7 @@ stages:
|
||||
git submodule update --init --recursive -- src/sonic-platform-daemons src/sonic-genl-packet src/sonic-sairedis src/ptf src/sonic-device-data
|
||||
|
||||
make SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y configure PLATFORM=generic
|
||||
make SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y LEGACY_SONIC_MGMT_DOCKER=n target/docker-sonic-mgmt.gz
|
||||
make -f Makefile.work BLDENV=bullseye SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y LEGACY_SONIC_MGMT_DOCKER=n target/docker-sonic-mgmt.gz
|
||||
cp target -r $(Build.ArtifactStagingDirectory)/target
|
||||
docker load -i target/docker-sonic-mgmt.gz
|
||||
docker tag docker-sonic-mgmt $REGISTRY_SERVER/docker-sonic-mgmt:py3only
|
||||
|
@ -43,7 +43,7 @@ stages:
|
||||
git submodule update --init --recursive -- src/sonic-platform-daemons src/sonic-genl-packet src/sonic-sairedis src/ptf src/sonic-device-data
|
||||
|
||||
make SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y configure PLATFORM=generic
|
||||
make SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y LEGACY_SONIC_MGMT_DOCKER=y target/docker-sonic-mgmt.gz
|
||||
make -f Makefile.work BLDENV=bullseye SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y LEGACY_SONIC_MGMT_DOCKER=y target/docker-sonic-mgmt.gz
|
||||
cp target -r $(Build.ArtifactStagingDirectory)/target
|
||||
docker load -i target/docker-sonic-mgmt.gz
|
||||
docker tag docker-sonic-mgmt $REGISTRY_SERVER/docker-sonic-mgmt:latest
|
||||
|
@ -3,3 +3,4 @@ DOCKER_SONIC_MGMT = docker-sonic-mgmt.gz
|
||||
$(DOCKER_SONIC_MGMT)_PATH = $(DOCKERS_PATH)/docker-sonic-mgmt
|
||||
$(DOCKER_SONIC_MGMT)_DEPENDS += $(SONIC_DEVICE_DATA) $(PTF)
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SONIC_MGMT)
|
||||
SONIC_BULLSEYE_DOCKERS += $(DOCKER_SONIC_MGMT)
|
||||
|
Loading…
Reference in New Issue
Block a user