[swss]: Convert swss docker to bullseye (#10484)
* [swss]: Convert swss docker to bullseye Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
This commit is contained in:
parent
59e11f6e79
commit
0eeb249fd8
@ -1,5 +1,5 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-swss-layer-buster-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
|
||||
FROM docker-swss-layer-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
|
||||
|
||||
ARG docker_container_name
|
||||
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
||||
@ -26,17 +26,10 @@ RUN apt-get update && \
|
||||
|
||||
{% if ( CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" ) %}
|
||||
# Fix for gcc/python/iputils-ping not found in arm docker
|
||||
RUN apt-get install -f -y python2.7 python2.7-dev
|
||||
RUN apt-get install -y \
|
||||
gcc-8 \
|
||||
gcc \
|
||||
iputils-ping
|
||||
{% endif %}
|
||||
{% if CONFIGURED_ARCH == "armhf" %}
|
||||
RUN ln -s -f /usr/bin/gcc-8 /usr/bin/arm-linux-gnueabihf-gcc
|
||||
{% endif %}
|
||||
{% if CONFIGURED_ARCH == "arm64" %}
|
||||
RUN ln -s -f /usr/bin/gcc-8 /usr/bin/aarch64-linux-gnu-gcc
|
||||
{% endif %}
|
||||
|
||||
# Dependencies of restore_neighbors.py
|
||||
RUN pip3 install \
|
||||
@ -45,7 +38,7 @@ RUN pip3 install \
|
||||
|
||||
{% if ( CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" ) %}
|
||||
# Remove installed gcc
|
||||
RUN apt-get remove -y gcc-8
|
||||
RUN apt-get remove -y gcc
|
||||
{% endif %}
|
||||
|
||||
{% if docker_orchagent_debs.strip() -%}
|
||||
|
22
dockers/docker-swss-layer-bullseye/Dockerfile.j2
Normal file
22
dockers/docker-swss-layer-bullseye/Dockerfile.j2
Normal file
@ -0,0 +1,22 @@
|
||||
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||
FROM docker-config-engine-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
|
||||
|
||||
## Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
{% if docker_swss_layer_bullseye_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
{{ copy_files("debs/", docker_swss_layer_bullseye_debs.split(' '), "/debs/") }}
|
||||
|
||||
# Install locally-built Debian packages and implicitly install their dependencies
|
||||
{{ install_debian_packages(docker_swss_layer_bullseye_debs.split(' ')) }}
|
||||
{%- endif %}
|
||||
|
||||
RUN apt-get clean -y && \
|
||||
apt-get autoclean -y && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /debs
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/supervisord"]
|
@ -6,17 +6,17 @@ DOCKER_ORCHAGENT_DBG = $(DOCKER_ORCHAGENT_STEM)-$(DBG_IMAGE_MARK).gz
|
||||
|
||||
$(DOCKER_ORCHAGENT)_DEPENDS += $(SWSS)
|
||||
|
||||
$(DOCKER_ORCHAGENT)_DBG_DEPENDS = $($(DOCKER_SWSS_LAYER_BUSTER)_DBG_DEPENDS)
|
||||
$(DOCKER_ORCHAGENT)_DBG_DEPENDS = $($(DOCKER_SWSS_LAYER_BULLSEYE)_DBG_DEPENDS)
|
||||
$(DOCKER_ORCHAGENT)_DBG_DEPENDS += $(SWSS_DBG) \
|
||||
$(LIBSWSSCOMMON_DBG) \
|
||||
$(LIBSAIREDIS_DBG)
|
||||
$(DOCKER_ORCHAGENT)_PYTHON_WHEELS += $(SCAPY)
|
||||
|
||||
$(DOCKER_ORCHAGENT)_DBG_IMAGE_PACKAGES = $($(DOCKER_SWSS_LAYER_BUSTER)_DBG_IMAGE_PACKAGES)
|
||||
$(DOCKER_ORCHAGENT)_DBG_IMAGE_PACKAGES = $($(DOCKER_SWSS_LAYER_BULLSEYE)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
$(DOCKER_ORCHAGENT)_PATH = $(DOCKERS_PATH)/$(DOCKER_ORCHAGENT_STEM)
|
||||
|
||||
$(DOCKER_ORCHAGENT)_LOAD_DOCKERS += $(DOCKER_SWSS_LAYER_BUSTER)
|
||||
$(DOCKER_ORCHAGENT)_LOAD_DOCKERS += $(DOCKER_SWSS_LAYER_BULLSEYE)
|
||||
|
||||
$(DOCKER_ORCHAGENT)_VERSION = 1.0.0
|
||||
$(DOCKER_ORCHAGENT)_PACKAGE_NAME = swss
|
||||
@ -39,6 +39,3 @@ $(DOCKER_ORCHAGENT)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw
|
||||
|
||||
$(DOCKER_ORCHAGENT)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
|
||||
$(DOCKER_ORCHAGENT)_FILES += $(ARP_UPDATE_SCRIPT) $(ARP_UPDATE_VARS_TEMPLATE) $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
|
||||
|
||||
SONIC_BUSTER_DOCKERS += $(DOCKER_ORCHAGENT)
|
||||
SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_ORCHAGENT_DBG)
|
||||
|
9
rules/docker-swss-layer-bullseye.dep
Normal file
9
rules/docker-swss-layer-bullseye.dep
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
DPATH := $($(DOCKER_SWSS_LAYER_BULLSEYE)_PATH)
|
||||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/docker-swss-layer-bullseye.mk rules/docker-swss-layer-bullseye.dep
|
||||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
||||
DEP_FILES += $(shell git ls-files $(DPATH))
|
||||
|
||||
$(DOCKER_SWSS_LAYER_BULLSEYE)_CACHE_MODE := GIT_CONTENT_SHA
|
||||
$(DOCKER_SWSS_LAYER_BULLSEYE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
|
||||
$(DOCKER_SWSS_LAYER_BULLSEYE)_DEP_FILES := $(DEP_FILES)
|
14
rules/docker-swss-layer-bullseye.mk
Normal file
14
rules/docker-swss-layer-bullseye.mk
Normal file
@ -0,0 +1,14 @@
|
||||
# bullseye-based docker image for sonic swss layer
|
||||
|
||||
DOCKER_SWSS_LAYER_BULLSEYE= docker-swss-layer-bullseye.gz
|
||||
$(DOCKER_SWSS_LAYER_BULLSEYE)_PATH = $(DOCKERS_PATH)/docker-swss-layer-bullseye
|
||||
|
||||
$(DOCKER_SWSS_LAYER_BULLSEYE)_DEPENDS += $(SWSS)
|
||||
$(DOCKER_SWSS_LAYER_BULLSEYE)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BULLSEYE)
|
||||
|
||||
$(DOCKER_SWSS_LAYER_BULLSEYE)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_DEPENDS) \
|
||||
$(SWSS)
|
||||
$(DOCKER_SWSS_LAYER_BULLSEYE)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BULLSEYE)_DBG_IMAGE_PACKAGES)
|
||||
|
||||
SONIC_DOCKER_IMAGES += $(DOCKER_SWSS_LAYER_BULLSEYE)
|
||||
SONIC_BULLSEYE_DOCKERS += $(DOCKER_SWSS_LAYER_BULLSEYE)
|
Loading…
Reference in New Issue
Block a user