Skip to content

Commit

Permalink
Update P4RT docker to Bookworm (#18886)
Browse files Browse the repository at this point in the history
Signed-off-by: mkeda <mikeattig@google.com>
  • Loading branch information
mkeda authored May 30, 2024
1 parent f5b20f8 commit 0e3fbd9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dockers/docker-sonic-p4rt/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
FROM docker-config-engine-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
FROM docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}

ARG docker_container_name
ARG git_commit
Expand Down
10 changes: 5 additions & 5 deletions rules/docker-p4rt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ DOCKER_P4RT_DBG = $(DOCKER_P4RT_STEM)-$(DBG_IMAGE_MARK).gz
$(DOCKER_P4RT)_PATH = $(DOCKERS_PATH)/$(DOCKER_P4RT_STEM)

$(DOCKER_P4RT)_DEPENDS += $(SONIC_P4RT)
$(DOCKER_P4RT)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS)
$(DOCKER_P4RT)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_DEPENDS)
$(DOCKER_P4RT)_DBG_DEPENDS += $(SONIC_P4RT_DBG) $(LIBSWSSCOMMON_DBG)
$(DOCKER_P4RT)_DBG_DEPENDS += $(LIBSAIREDIS_DBG)
$(DOCKER_P4RT)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES)
$(DOCKER_P4RT)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_IMAGE_PACKAGES)

$(DOCKER_P4RT)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BULLSEYE)
$(DOCKER_P4RT)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BOOKWORM)

$(DOCKER_P4RT)_VERSION = 1.0.0
$(DOCKER_P4RT)_PACKAGE_NAME = p4rt
Expand All @@ -21,9 +21,9 @@ $(DOCKER_P4RT)_FAST_SHUTDOWN_BEFORE = swss

# TODO: Enable P4RT DBG
SONIC_DOCKER_IMAGES += $(DOCKER_P4RT)
SONIC_BULLSEYE_DOCKERS += $(DOCKER_P4RT)
SONIC_BOOKWORM_DOCKERS += $(DOCKER_P4RT)
# SONIC_DOCKER_DBG_IMAGES += $(DOCKER_P4RT_DBG)
# SONIC_BULLSEYE_DBG_DOCKERS += $(DOCKER_P4RT_DBG)
# SONIC_BOOKWORM_DBG_DOCKERS += $(DOCKER_P4RT_DBG)

ifeq ($(INCLUDE_P4RT), y)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_P4RT)
Expand Down
4 changes: 4 additions & 0 deletions src/sonic-p4rt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ BAZEL_BUILD_OPTS += --fission=yes --features=per_object_debug_info
# Override sonic_swss_common to use the version specific to this buildimage.
BAZEL_BUILD_OPTS += --override_repository=sonic_swss_common=/sonic/src/sonic-swss-common

# Newer version of gcc has spurious warnings in boringssl package.
BAZEL_BUILD_OPTS += --copt=-Wno-array-bounds
BAZEL_BUILD_OPTS += --copt=-Wno-stringop-overflow

# Build optimized, stripped binaries.
BAZEL_BUILD_OPTS += -c opt

Expand Down

0 comments on commit 0e3fbd9

Please sign in to comment.