Skip to content

Commit

Permalink
Add Bookworm swss-layer (#18062)
Browse files Browse the repository at this point in the history
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
  • Loading branch information
saiarcot895 authored and pull[bot] committed Feb 24, 2024
1 parent 9d42e5a commit 9545544
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
24 changes: 24 additions & 0 deletions dockers/docker-swss-layer-bookworm/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
FROM docker-config-engine-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}

## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update

RUN apt-get install iputils-ping

{% if docker_swss_layer_bookworm_debs.strip() -%}
# Copy locally-built Debian package dependencies
{{ copy_files("debs/", docker_swss_layer_bookworm_debs.split(' '), "/debs/") }}

# Install locally-built Debian packages and implicitly install their dependencies
{{ install_debian_packages(docker_swss_layer_bookworm_debs.split(' ')) }}
{%- endif %}

RUN apt-get clean -y && \
apt-get autoclean -y && \
apt-get autoremove -y && \
rm -rf /debs

ENTRYPOINT ["/usr/local/bin/supervisord"]
9 changes: 9 additions & 0 deletions rules/docker-swss-layer-bookworm.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

DPATH := $($(DOCKER_SWSS_LAYER_BOOKWORM)_PATH)
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-swss-layer-bookworm.mk rules/docker-swss-layer-bookworm.dep
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(DPATH))

$(DOCKER_SWSS_LAYER_BOOKWORM)_CACHE_MODE := GIT_CONTENT_SHA
$(DOCKER_SWSS_LAYER_BOOKWORM)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(DOCKER_SWSS_LAYER_BOOKWORM)_DEP_FILES := $(DEP_FILES)
14 changes: 14 additions & 0 deletions rules/docker-swss-layer-bookworm.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# bookworm-based docker image for sonic swss layer

DOCKER_SWSS_LAYER_BOOKWORM= docker-swss-layer-bookworm.gz
$(DOCKER_SWSS_LAYER_BOOKWORM)_PATH = $(DOCKERS_PATH)/docker-swss-layer-bookworm

$(DOCKER_SWSS_LAYER_BOOKWORM)_DEPENDS += $(SWSS)
$(DOCKER_SWSS_LAYER_BOOKWORM)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BOOKWORM)

$(DOCKER_SWSS_LAYER_BOOKWORM)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_DEPENDS) \
$(SWSS_DBG)
$(DOCKER_SWSS_LAYER_BOOKWORM)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BOOKWORM)_DBG_IMAGE_PACKAGES)

SONIC_DOCKER_IMAGES += $(DOCKER_SWSS_LAYER_BOOKWORM)
SONIC_BOOKWORM_DOCKERS += $(DOCKER_SWSS_LAYER_BOOKWORM)

0 comments on commit 9545544

Please sign in to comment.