From a624e0c0b205b84dc70c72dbf511446bcf8723e6 Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Mon, 14 Sep 2020 14:50:04 +0300 Subject: [PATCH 01/21] [dockers] Tag all docker images with a version number Previously all docker images built into SONiC binary were tagged with SONiC version string. With the introduction of container upgrades and SONiC extension framework all docker images should have their own version numbers that do not relate with SONiC version. All dockers are tagged with version 1.0.0 in this PR. Whenever changes are introduced to a docker image that require a version change, the docker image maintainer should update the version number. Signed-off-by: Stepan Blyschak --- files/build_templates/sonic_debian_extension.j2 | 10 ++++++---- platform/barefoot/docker-syncd-bfn-rpc.mk | 1 + platform/barefoot/docker-syncd-bfn.mk | 2 ++ platform/broadcom/docker-syncd-brcm-rpc.mk | 1 + platform/broadcom/docker-syncd-brcm.mk | 2 ++ platform/cavium/docker-syncd-cavm-rpc.mk | 1 + platform/cavium/docker-syncd-cavm.mk | 2 ++ platform/centec-arm64/docker-syncd-centec-rpc.mk | 1 + platform/centec-arm64/docker-syncd-centec.mk | 1 + platform/centec/docker-syncd-centec-rpc.mk | 1 + platform/centec/docker-syncd-centec.mk | 2 ++ platform/innovium/docker-syncd-invm-rpc.mk | 1 + platform/innovium/docker-syncd-invm.mk | 2 ++ platform/marvell-arm64/docker-syncd-mrvl-rpc.mk | 1 + platform/marvell-arm64/docker-syncd-mrvl.mk | 2 ++ platform/marvell-armhf/docker-syncd-mrvl-rpc.mk | 1 + platform/marvell-armhf/docker-syncd-mrvl.mk | 2 ++ platform/marvell/docker-syncd-mrvl-rpc.mk | 1 + platform/marvell/docker-syncd-mrvl.mk | 2 ++ platform/mellanox/docker-syncd-mlnx-rpc.mk | 1 + platform/mellanox/docker-syncd-mlnx.mk | 2 ++ platform/nephos/docker-syncd-nephos-rpc.mk | 1 + platform/nephos/docker-syncd-nephos.mk | 4 +++- platform/vs/docker-gbsyncd-vs.mk | 1 + platform/vs/docker-syncd-vs.mk | 2 ++ rules/docker-database.mk | 2 ++ rules/docker-dhcp-relay.mk | 2 ++ rules/docker-fpm-frr.mk | 2 ++ rules/docker-fpm-gobgp.mk | 3 +++ rules/docker-fpm-quagga.mk | 3 +++ rules/docker-iccpd.mk | 2 ++ rules/docker-lldp.mk | 2 ++ rules/docker-nat.mk | 2 ++ rules/docker-orchagent.mk | 2 ++ rules/docker-platform-monitor.mk | 2 ++ rules/docker-restapi.mk | 2 ++ rules/docker-router-advertiser.mk | 2 ++ rules/docker-sflow.mk | 2 ++ rules/docker-snmp.mk | 2 ++ rules/docker-sonic-mgmt-framework.mk | 3 +++ rules/docker-teamd.mk | 2 ++ rules/docker-telemetry.mk | 3 +++ slave.mk | 2 +- 43 files changed, 81 insertions(+), 6 deletions(-) diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 7afc099e3a40..d9d0d54ed518 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -513,13 +513,15 @@ sudo mkdir $FILESYSTEM_ROOT/target sudo mount --bind target $FILESYSTEM_ROOT/target sudo chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS info {% for image in installer_images.strip().split(' ') -%} -{% set imagefilename = image.split('/')|last -%} +{% set imagefilepath = image.split(':')|first -%} +{% set imageversion = image.split(':')|last -%} +{% set imagefilename = imagefilepath.split('/')|last -%} {% set imagename = imagefilename.split('.')|first -%} -sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS load -i {{image}} -sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagename}}:"${SONIC_IMAGE_VERSION}" +sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS load -i {{imagefilepath}} +sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagename}}:{{imageversion}} {% if imagename.endswith('-dbg') %} {% set imagebasename = imagename.replace('-dbg', '') -%} -sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagebasename}}:"${SONIC_IMAGE_VERSION}" +sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagebasename}}:{{imageversion}} sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagebasename}}:latest {% endif %} {% endfor %} diff --git a/platform/barefoot/docker-syncd-bfn-rpc.mk b/platform/barefoot/docker-syncd-bfn-rpc.mk index 11b70a3a774f..41c55b1bcf7d 100644 --- a/platform/barefoot/docker-syncd-bfn-rpc.mk +++ b/platform/barefoot/docker-syncd-bfn-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BFN_RPC) endif $(DOCKER_SYNCD_BFN_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_BFN_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/barefoot/docker-syncd-bfn.mk b/platform/barefoot/docker-syncd-bfn.mk index ae4ca9d9f272..d3d018393b47 100644 --- a/platform/barefoot/docker-syncd-bfn.mk +++ b/platform/barefoot/docker-syncd-bfn.mk @@ -10,6 +10,8 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ $(LIBSAIMETADATA_DBG) \ $(LIBSAIREDIS_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) diff --git a/platform/broadcom/docker-syncd-brcm-rpc.mk b/platform/broadcom/docker-syncd-brcm-rpc.mk index b1a58232927d..ca9bfaac54dd 100644 --- a/platform/broadcom/docker-syncd-brcm-rpc.mk +++ b/platform/broadcom/docker-syncd-brcm-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_RPC) endif $(DOCKER_SYNCD_BRCM_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_BRCM_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/platform/broadcom/docker-syncd-brcm.mk b/platform/broadcom/docker-syncd-brcm.mk index b1b412fc9edd..3b59a99f9131 100644 --- a/platform/broadcom/docker-syncd-brcm.mk +++ b/platform/broadcom/docker-syncd-brcm.mk @@ -14,6 +14,8 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += bcmcmd:/usr/bin/bcmcmd diff --git a/platform/cavium/docker-syncd-cavm-rpc.mk b/platform/cavium/docker-syncd-cavm-rpc.mk index a19124609bb0..10a47d31b32b 100644 --- a/platform/cavium/docker-syncd-cavm-rpc.mk +++ b/platform/cavium/docker-syncd-cavm-rpc.mk @@ -17,6 +17,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM_RPC) endif $(DOCKER_SYNCD_CAVM_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_CAVM_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_CAVM_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_CAVM_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_CAVM_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/cavium/docker-syncd-cavm.mk b/platform/cavium/docker-syncd-cavm.mk index 059d2c71ebb4..02b1a6d73f83 100644 --- a/platform/cavium/docker-syncd-cavm.mk +++ b/platform/cavium/docker-syncd-cavm.mk @@ -16,6 +16,8 @@ ifneq ($(ENABLE_SYNCD_RPC),y) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM) endif +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_CAVM)_CONTAINER_NAME = syncd $(DOCKER_SYNCD_CAVM)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_CAVM)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/centec-arm64/docker-syncd-centec-rpc.mk b/platform/centec-arm64/docker-syncd-centec-rpc.mk index 8d699c91347f..e66089249622 100755 --- a/platform/centec-arm64/docker-syncd-centec-rpc.mk +++ b/platform/centec-arm64/docker-syncd-centec-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC_RPC) endif $(DOCKER_SYNCD_CENTEC_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_CENTEC_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/centec-arm64/docker-syncd-centec.mk b/platform/centec-arm64/docker-syncd-centec.mk index 9943420660a4..e9db642b026e 100755 --- a/platform/centec-arm64/docker-syncd-centec.mk +++ b/platform/centec-arm64/docker-syncd-centec.mk @@ -13,6 +13,7 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_CENTEC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/centec/docker-syncd-centec-rpc.mk b/platform/centec/docker-syncd-centec-rpc.mk index 8915f1c35679..b5b98e7bee4e 100644 --- a/platform/centec/docker-syncd-centec-rpc.mk +++ b/platform/centec/docker-syncd-centec-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC_RPC) endif $(DOCKER_SYNCD_CENTEC_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_CENTEC_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd diff --git a/platform/centec/docker-syncd-centec.mk b/platform/centec/docker-syncd-centec.mk index ada63a218d4a..d5d819f2235a 100644 --- a/platform/centec/docker-syncd-centec.mk +++ b/platform/centec/docker-syncd-centec.mk @@ -13,6 +13,8 @@ $(DOCKER_SYNCD_CENTEC)_DEPENDS += $(SYNCD_DBG) \ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_CENTEC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd diff --git a/platform/innovium/docker-syncd-invm-rpc.mk b/platform/innovium/docker-syncd-invm-rpc.mk index 62d6891bbc21..de4cce280c70 100755 --- a/platform/innovium/docker-syncd-invm-rpc.mk +++ b/platform/innovium/docker-syncd-invm-rpc.mk @@ -10,6 +10,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_INVM_RPC) endif $(DOCKER_SYNCD_INVM_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_INVM_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_INVM_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_INVM_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_INVM_RPC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd diff --git a/platform/innovium/docker-syncd-invm.mk b/platform/innovium/docker-syncd-invm.mk index 52c11b90911d..75d0a1d4933b 100755 --- a/platform/innovium/docker-syncd-invm.mk +++ b/platform/innovium/docker-syncd-invm.mk @@ -13,4 +13,6 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk b/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk index c3ce6c10119c..4d5b445cfbf7 100644 --- a/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk +++ b/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL_RPC) endif $(DOCKER_SYNCD_MRVL_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_MRVL_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/marvell-arm64/docker-syncd-mrvl.mk b/platform/marvell-arm64/docker-syncd-mrvl.mk index dd01caab687b..2b8fc7f9d2ca 100644 --- a/platform/marvell-arm64/docker-syncd-mrvl.mk +++ b/platform/marvell-arm64/docker-syncd-mrvl.mk @@ -13,5 +13,7 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk b/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk index c3ce6c10119c..4d5b445cfbf7 100644 --- a/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk +++ b/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL_RPC) endif $(DOCKER_SYNCD_MRVL_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_MRVL_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/marvell-armhf/docker-syncd-mrvl.mk b/platform/marvell-armhf/docker-syncd-mrvl.mk index dd01caab687b..2b8fc7f9d2ca 100644 --- a/platform/marvell-armhf/docker-syncd-mrvl.mk +++ b/platform/marvell-armhf/docker-syncd-mrvl.mk @@ -13,5 +13,7 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/marvell/docker-syncd-mrvl-rpc.mk b/platform/marvell/docker-syncd-mrvl-rpc.mk index c3ce6c10119c..4d5b445cfbf7 100644 --- a/platform/marvell/docker-syncd-mrvl-rpc.mk +++ b/platform/marvell/docker-syncd-mrvl-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL_RPC) endif $(DOCKER_SYNCD_MRVL_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_MRVL_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/marvell/docker-syncd-mrvl.mk b/platform/marvell/docker-syncd-mrvl.mk index d6d7d032b8ac..4cac777bf9e5 100644 --- a/platform/marvell/docker-syncd-mrvl.mk +++ b/platform/marvell/docker-syncd-mrvl.mk @@ -13,6 +13,8 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/mellanox/docker-syncd-mlnx-rpc.mk b/platform/mellanox/docker-syncd-mlnx-rpc.mk index 806b40035f23..dcdc79d36b59 100644 --- a/platform/mellanox/docker-syncd-mlnx-rpc.mk +++ b/platform/mellanox/docker-syncd-mlnx-rpc.mk @@ -20,6 +20,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX_RPC) endif $(DOCKER_SYNCD_MLNX_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_MLNX_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/mellanox/docker-syncd-mlnx.mk b/platform/mellanox/docker-syncd-mlnx.mk index 9bdc5a8ad8ec..c98cbebc01f2 100644 --- a/platform/mellanox/docker-syncd-mlnx.mk +++ b/platform/mellanox/docker-syncd-mlnx.mk @@ -14,5 +14,7 @@ ifeq ($(SDK_FROM_SRC), y) $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(MLNX_SDK_DBG_DEBS) $(MLNX_SAI_DBGSYM) endif +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/nephos/docker-syncd-nephos-rpc.mk b/platform/nephos/docker-syncd-nephos-rpc.mk index 39240c1913e4..8d3eeb55b01c 100644 --- a/platform/nephos/docker-syncd-nephos-rpc.mk +++ b/platform/nephos/docker-syncd-nephos-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS_RPC) endif $(DOCKER_SYNCD_NEPHOS_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_NEPHOS_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/platform/nephos/docker-syncd-nephos.mk b/platform/nephos/docker-syncd-nephos.mk index 146523ec1c64..f61320cdfaca 100644 --- a/platform/nephos/docker-syncd-nephos.mk +++ b/platform/nephos/docker-syncd-nephos.mk @@ -10,10 +10,12 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ $(LIBSWSSCOMMON_DBG) \ $(LIBSAIMETADATA_DBG) \ $(LIBSAIREDIS_DBG) - + SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd diff --git a/platform/vs/docker-gbsyncd-vs.mk b/platform/vs/docker-gbsyncd-vs.mk index 2013132d6281..b19fad685009 100644 --- a/platform/vs/docker-gbsyncd-vs.mk +++ b/platform/vs/docker-gbsyncd-vs.mk @@ -11,4 +11,5 @@ $(DOCKER_GBSYNCD_BASE)_DBG_DEPENDS += $(SYNCD_VS_DBG) \ $(LIBSAIREDIS_DBG) \ $(LIBSAIVS_DBG) +$(DOCKER_GBSYNCD_BASE)_VERSION = 1.0.0 $(DOCKER_GBSYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/platform/vs/docker-syncd-vs.mk b/platform/vs/docker-syncd-vs.mk index 15d94c5854d2..3dd112ad4e91 100644 --- a/platform/vs/docker-syncd-vs.mk +++ b/platform/vs/docker-syncd-vs.mk @@ -11,4 +11,6 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_VS_DBG) \ $(LIBSAIREDIS_DBG) \ $(LIBSAIVS_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/rules/docker-database.mk b/rules/docker-database.mk index 0a2f46d19223..ab2ce3582662 100644 --- a/rules/docker-database.mk +++ b/rules/docker-database.mk @@ -12,6 +12,8 @@ $(DOCKER_DATABASE)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMA $(DOCKER_DATABASE)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_DATABASE)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_DATABASE) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_DATABASE) diff --git a/rules/docker-dhcp-relay.mk b/rules/docker-dhcp-relay.mk index 860928bf8176..0412d2550247 100644 --- a/rules/docker-dhcp-relay.mk +++ b/rules/docker-dhcp-relay.mk @@ -14,6 +14,8 @@ $(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_I $(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_DHCP_RELAY)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY) diff --git a/rules/docker-fpm-frr.mk b/rules/docker-fpm-frr.mk index 833d510245ea..07516ef0a1e5 100644 --- a/rules/docker-fpm-frr.mk +++ b/rules/docker-fpm-frr.mk @@ -16,6 +16,8 @@ $(DOCKER_FPM_FRR)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAG $(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_FPM_FRR)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_FPM_FRR) SONIC_DOCKER_DBG_IMAGES += $(DOCKER_FPM_FRR_DBG) diff --git a/rules/docker-fpm-gobgp.mk b/rules/docker-fpm-gobgp.mk index 03ec88e85b56..8a285f3a6dc9 100644 --- a/rules/docker-fpm-gobgp.mk +++ b/rules/docker-fpm-gobgp.mk @@ -4,6 +4,9 @@ DOCKER_FPM_GOBGP = docker-fpm-gobgp.gz $(DOCKER_FPM_GOBGP)_PATH = $(DOCKERS_PATH)/docker-fpm-gobgp $(DOCKER_FPM_GOBGP)_DEPENDS += $(GOBGP) $(DOCKER_FPM_GOBGP)_LOAD_DOCKERS += $(DOCKER_FPM_QUAGGA) + +$(DOCKER_FPM_GOBGP)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_FPM_GOBGP) $(DOCKER_FPM_GOBGP)_CONTAINER_NAME = bgp diff --git a/rules/docker-fpm-quagga.mk b/rules/docker-fpm-quagga.mk index 5a384eedab2c..ec77e7c32928 100644 --- a/rules/docker-fpm-quagga.mk +++ b/rules/docker-fpm-quagga.mk @@ -4,6 +4,9 @@ DOCKER_FPM_QUAGGA = docker-fpm-quagga.gz $(DOCKER_FPM_QUAGGA)_PATH = $(DOCKERS_PATH)/docker-fpm-quagga $(DOCKER_FPM_QUAGGA)_DEPENDS += $(QUAGGA) $(SWSS) $(DOCKER_FPM_QUAGGA)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE) + +$(DOCKER_FPM_QUAGGA)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_FPM_QUAGGA) $(DOCKER_FPM_QUAGGA)_CONTAINER_NAME = bgp diff --git a/rules/docker-iccpd.mk b/rules/docker-iccpd.mk index da77d9c9c1fd..aa29bdc3050e 100644 --- a/rules/docker-iccpd.mk +++ b/rules/docker-iccpd.mk @@ -10,6 +10,8 @@ $(DOCKER_ICCPD)_DBG_DEPENDS += $(SWSS_DBG) $(LIBSWSSCOMMON_DBG) $(ICCPD_DBG) $(DOCKER_ICCPD)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) $(DOCKER_ICCPD)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_ICCPD)_VERSION = 1.0.0 + ifeq ($(INCLUDE_ICCPD), y) SONIC_DOCKER_IMAGES += $(DOCKER_ICCPD) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ICCPD) diff --git a/rules/docker-lldp.mk b/rules/docker-lldp.mk index 36c8a3a3536d..2ccf375e25cd 100644 --- a/rules/docker-lldp.mk +++ b/rules/docker-lldp.mk @@ -16,6 +16,8 @@ $(DOCKER_LLDP)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_P $(DOCKER_LLDP)_PYTHON_WHEELS += $(DBSYNCD_PY2) $(DOCKER_LLDP)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_LLDP)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_LLDP) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_LLDP) diff --git a/rules/docker-nat.mk b/rules/docker-nat.mk index 981019dbcdb6..e84174088f0b 100644 --- a/rules/docker-nat.mk +++ b/rules/docker-nat.mk @@ -13,6 +13,8 @@ $(DOCKER_NAT)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PA $(DOCKER_NAT)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_NAT)_VERSION = 1.0.0 + ifeq ($(INCLUDE_NAT), y) SONIC_DOCKER_IMAGES += $(DOCKER_NAT) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_NAT) diff --git a/rules/docker-orchagent.mk b/rules/docker-orchagent.mk index 5e2e08ee2437..91e9ea1623a0 100644 --- a/rules/docker-orchagent.mk +++ b/rules/docker-orchagent.mk @@ -17,6 +17,8 @@ $(DOCKER_ORCHAGENT)_PATH = $(DOCKERS_PATH)/$(DOCKER_ORCHAGENT_STEM) $(DOCKER_ORCHAGENT)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_ORCHAGENT)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT) diff --git a/rules/docker-platform-monitor.mk b/rules/docker-platform-monitor.mk index afe27d70e492..1307d0dee62b 100644 --- a/rules/docker-platform-monitor.mk +++ b/rules/docker-platform-monitor.mk @@ -35,6 +35,8 @@ $(DOCKER_PLATFORM_MONITOR)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_PLATFORM_MONITOR)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_PLATFORM_MONITOR) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_PLATFORM_MONITOR) diff --git a/rules/docker-restapi.mk b/rules/docker-restapi.mk index ef56789dd759..d9d6bb34a311 100644 --- a/rules/docker-restapi.mk +++ b/rules/docker-restapi.mk @@ -10,6 +10,8 @@ $(DOCKER_RESTAPI)_PATH = $(DOCKERS_PATH)/$(DOCKER_RESTAPI_STEM) $(DOCKER_RESTAPI)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH) +$(DOCKER_RESTAPI)_VERSION = 1.0.0 + ifeq ($(INCLUDE_RESTAPI), y) SONIC_DOCKER_IMAGES += $(DOCKER_RESTAPI) SONIC_STRETCH_DOCKERS += $(DOCKER_RESTAPI) diff --git a/rules/docker-router-advertiser.mk b/rules/docker-router-advertiser.mk index 3b9f7ae8ba01..adc06f4ea5f5 100644 --- a/rules/docker-router-advertiser.mk +++ b/rules/docker-router-advertiser.mk @@ -13,6 +13,8 @@ $(DOCKER_ROUTER_ADVERTISER)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER $(DOCKER_ROUTER_ADVERTISER)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_ROUTER_ADVERTISER)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_ROUTER_ADVERTISER) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ROUTER_ADVERTISER) diff --git a/rules/docker-sflow.mk b/rules/docker-sflow.mk index 6888304b8bce..9a909e2d4723 100644 --- a/rules/docker-sflow.mk +++ b/rules/docker-sflow.mk @@ -13,6 +13,8 @@ $(DOCKER_SFLOW)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_ $(DOCKER_SFLOW)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_SFLOW)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_SFLOW) ifeq ($(INCLUDE_SFLOW), y) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SFLOW) diff --git a/rules/docker-snmp.mk b/rules/docker-snmp.mk index 3493a2dfa337..7241f688faf9 100644 --- a/rules/docker-snmp.mk +++ b/rules/docker-snmp.mk @@ -17,6 +17,8 @@ $(DOCKER_SNMP)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_P $(DOCKER_SNMP)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3) $(SWSSSDK_PY3) $(ASYNCSNMP_PY3) $(DOCKER_SNMP)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_SNMP)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_SNMP) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SNMP) diff --git a/rules/docker-sonic-mgmt-framework.mk b/rules/docker-sonic-mgmt-framework.mk index 65bac8bd9ddc..d0137ee034fb 100644 --- a/rules/docker-sonic-mgmt-framework.mk +++ b/rules/docker-sonic-mgmt-framework.mk @@ -13,6 +13,9 @@ $(DOCKER_MGMT_FRAMEWORK)_DBG_DEPENDS += $(SONIC_MGMT_FRAMEWORK_DBG) SONIC_DOCKER_IMAGES += $(DOCKER_MGMT_FRAMEWORK) $(DOCKER_MGMT_FRAMEWORK)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) + +$(DOCKER_MGMT_FRAMEWORK)_VERSION = 1.0.0 + $(DOCKER_MGMT_FRAMEWORK)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) ifeq ($(INCLUDE_MGMT_FRAMEWORK), y) diff --git a/rules/docker-teamd.mk b/rules/docker-teamd.mk index 5442d5bf6b3f..63c12196d5d6 100644 --- a/rules/docker-teamd.mk +++ b/rules/docker-teamd.mk @@ -15,6 +15,8 @@ $(DOCKER_TEAMD)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_ $(DOCKER_TEAMD)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_TEAMD)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_TEAMD) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_TEAMD) diff --git a/rules/docker-telemetry.mk b/rules/docker-telemetry.mk index 15f90c74c810..dcd02a665722 100644 --- a/rules/docker-telemetry.mk +++ b/rules/docker-telemetry.mk @@ -11,6 +11,9 @@ $(DOCKER_TELEMETRY)_DEPENDS += $(SONIC_TELEMETRY) $(DOCKER_TELEMETRY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) $(DOCKER_TELEMETRY)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) + +$(DOCKER_TELEMETRY)_VERSION = 1.0.0 + $(DOCKER_TELEMETRY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) SONIC_DOCKER_IMAGES += $(DOCKER_TELEMETRY) diff --git a/slave.mk b/slave.mk index a959936f1aa4..45abd73818af 100644 --- a/slave.mk +++ b/slave.mk @@ -868,7 +868,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ export enable_pfcwd_on_start="$(ENABLE_PFCWD_ON_START)" export installer_debs="$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$($*_INSTALLS))" export lazy_installer_debs="$(foreach deb, $($*_LAZY_INSTALLS),$(foreach device, $($(deb)_PLATFORM),$(addprefix $(device)@, $(IMAGE_DISTRO_DEBS_PATH)/$(deb))))" - export installer_images="$(addprefix $(TARGET_PATH)/,$($*_DOCKERS))" + export installer_images="$(foreach docker, $($*_DOCKERS),$(addprefix $(TARGET_PATH)/,$(addsuffix :$($(docker)_VERSION),$(docker))))" export sonic_py_common_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PY_COMMON_PY2))" export sonic_py_common_py3_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PY_COMMON_PY3))" export config_engine_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE_PY2))" From 875650f09e1e76f7f9ac6ca8d9a14f2271efcfe3 Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Mon, 14 Sep 2020 14:50:04 +0300 Subject: [PATCH 02/21] [dockers] Tag all docker images with a version number Previously all docker images built into SONiC binary were tagged with SONiC version string. With the introduction of container upgrades and SONiC extension framework all docker images should have their own version numbers that do not relate with SONiC version. All dockers are tagged with version 1.0.0 in this PR. Whenever changes are introduced to a docker image that require a version change, the docker image maintainer should update the version number. Signed-off-by: Stepan Blyschak --- files/build_templates/sonic_debian_extension.j2 | 10 ++++++---- platform/barefoot/docker-syncd-bfn-rpc.mk | 1 + platform/barefoot/docker-syncd-bfn.mk | 2 ++ platform/broadcom/docker-syncd-brcm-rpc.mk | 1 + platform/broadcom/docker-syncd-brcm.mk | 2 ++ platform/cavium/docker-syncd-cavm-rpc.mk | 1 + platform/cavium/docker-syncd-cavm.mk | 2 ++ platform/centec-arm64/docker-syncd-centec-rpc.mk | 1 + platform/centec-arm64/docker-syncd-centec.mk | 1 + platform/centec/docker-syncd-centec-rpc.mk | 1 + platform/centec/docker-syncd-centec.mk | 2 ++ platform/innovium/docker-syncd-invm-rpc.mk | 1 + platform/innovium/docker-syncd-invm.mk | 2 ++ platform/marvell-arm64/docker-syncd-mrvl-rpc.mk | 1 + platform/marvell-arm64/docker-syncd-mrvl.mk | 2 ++ platform/marvell-armhf/docker-syncd-mrvl-rpc.mk | 1 + platform/marvell-armhf/docker-syncd-mrvl.mk | 2 ++ platform/marvell/docker-syncd-mrvl-rpc.mk | 1 + platform/marvell/docker-syncd-mrvl.mk | 2 ++ platform/mellanox/docker-syncd-mlnx-rpc.mk | 1 + platform/mellanox/docker-syncd-mlnx.mk | 2 ++ platform/nephos/docker-syncd-nephos-rpc.mk | 1 + platform/nephos/docker-syncd-nephos.mk | 4 +++- platform/vs/docker-gbsyncd-vs.mk | 1 + platform/vs/docker-syncd-vs.mk | 2 ++ rules/docker-database.mk | 2 ++ rules/docker-dhcp-relay.mk | 2 ++ rules/docker-fpm-frr.mk | 2 ++ rules/docker-fpm-gobgp.mk | 3 +++ rules/docker-fpm-quagga.mk | 3 +++ rules/docker-iccpd.mk | 2 ++ rules/docker-lldp.mk | 2 ++ rules/docker-nat.mk | 2 ++ rules/docker-orchagent.mk | 2 ++ rules/docker-platform-monitor.mk | 2 ++ rules/docker-restapi.mk | 2 ++ rules/docker-router-advertiser.mk | 2 ++ rules/docker-sflow.mk | 2 ++ rules/docker-snmp.mk | 2 ++ rules/docker-sonic-mgmt-framework.mk | 3 +++ rules/docker-teamd.mk | 2 ++ rules/docker-telemetry.mk | 3 +++ slave.mk | 2 +- 43 files changed, 81 insertions(+), 6 deletions(-) diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 461c629284e7..1321ab2d4db3 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -523,13 +523,15 @@ sudo mkdir $FILESYSTEM_ROOT/target sudo mount --bind target $FILESYSTEM_ROOT/target sudo chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS info {% for image in installer_images.strip().split(' ') -%} -{% set imagefilename = image.split('/')|last -%} +{% set imagefilepath = image.split(':')|first -%} +{% set imageversion = image.split(':')|last -%} +{% set imagefilename = imagefilepath.split('/')|last -%} {% set imagename = imagefilename.split('.')|first -%} -sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS load -i {{image}} -sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagename}}:"${SONIC_IMAGE_VERSION}" +sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS load -i {{imagefilepath}} +sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagename}}:{{imageversion}} {% if imagename.endswith('-dbg') %} {% set imagebasename = imagename.replace('-dbg', '') -%} -sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagebasename}}:"${SONIC_IMAGE_VERSION}" +sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagebasename}}:{{imageversion}} sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagebasename}}:latest {% endif %} {% endfor %} diff --git a/platform/barefoot/docker-syncd-bfn-rpc.mk b/platform/barefoot/docker-syncd-bfn-rpc.mk index 11b70a3a774f..41c55b1bcf7d 100644 --- a/platform/barefoot/docker-syncd-bfn-rpc.mk +++ b/platform/barefoot/docker-syncd-bfn-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BFN_RPC) endif $(DOCKER_SYNCD_BFN_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_BFN_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/barefoot/docker-syncd-bfn.mk b/platform/barefoot/docker-syncd-bfn.mk index ae4ca9d9f272..d3d018393b47 100644 --- a/platform/barefoot/docker-syncd-bfn.mk +++ b/platform/barefoot/docker-syncd-bfn.mk @@ -10,6 +10,8 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ $(LIBSAIMETADATA_DBG) \ $(LIBSAIREDIS_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) diff --git a/platform/broadcom/docker-syncd-brcm-rpc.mk b/platform/broadcom/docker-syncd-brcm-rpc.mk index b1a58232927d..ca9bfaac54dd 100644 --- a/platform/broadcom/docker-syncd-brcm-rpc.mk +++ b/platform/broadcom/docker-syncd-brcm-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_RPC) endif $(DOCKER_SYNCD_BRCM_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_BRCM_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/platform/broadcom/docker-syncd-brcm.mk b/platform/broadcom/docker-syncd-brcm.mk index b1b412fc9edd..3b59a99f9131 100644 --- a/platform/broadcom/docker-syncd-brcm.mk +++ b/platform/broadcom/docker-syncd-brcm.mk @@ -14,6 +14,8 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += bcmcmd:/usr/bin/bcmcmd diff --git a/platform/cavium/docker-syncd-cavm-rpc.mk b/platform/cavium/docker-syncd-cavm-rpc.mk index a19124609bb0..10a47d31b32b 100644 --- a/platform/cavium/docker-syncd-cavm-rpc.mk +++ b/platform/cavium/docker-syncd-cavm-rpc.mk @@ -17,6 +17,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM_RPC) endif $(DOCKER_SYNCD_CAVM_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_CAVM_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_CAVM_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_CAVM_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_CAVM_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/cavium/docker-syncd-cavm.mk b/platform/cavium/docker-syncd-cavm.mk index 059d2c71ebb4..02b1a6d73f83 100644 --- a/platform/cavium/docker-syncd-cavm.mk +++ b/platform/cavium/docker-syncd-cavm.mk @@ -16,6 +16,8 @@ ifneq ($(ENABLE_SYNCD_RPC),y) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM) endif +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_CAVM)_CONTAINER_NAME = syncd $(DOCKER_SYNCD_CAVM)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_CAVM)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/centec-arm64/docker-syncd-centec-rpc.mk b/platform/centec-arm64/docker-syncd-centec-rpc.mk index 8d699c91347f..e66089249622 100755 --- a/platform/centec-arm64/docker-syncd-centec-rpc.mk +++ b/platform/centec-arm64/docker-syncd-centec-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC_RPC) endif $(DOCKER_SYNCD_CENTEC_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_CENTEC_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/centec-arm64/docker-syncd-centec.mk b/platform/centec-arm64/docker-syncd-centec.mk index 9943420660a4..e9db642b026e 100755 --- a/platform/centec-arm64/docker-syncd-centec.mk +++ b/platform/centec-arm64/docker-syncd-centec.mk @@ -13,6 +13,7 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_CENTEC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/centec/docker-syncd-centec-rpc.mk b/platform/centec/docker-syncd-centec-rpc.mk index 8915f1c35679..b5b98e7bee4e 100644 --- a/platform/centec/docker-syncd-centec-rpc.mk +++ b/platform/centec/docker-syncd-centec-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC_RPC) endif $(DOCKER_SYNCD_CENTEC_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_CENTEC_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd diff --git a/platform/centec/docker-syncd-centec.mk b/platform/centec/docker-syncd-centec.mk index ada63a218d4a..d5d819f2235a 100644 --- a/platform/centec/docker-syncd-centec.mk +++ b/platform/centec/docker-syncd-centec.mk @@ -13,6 +13,8 @@ $(DOCKER_SYNCD_CENTEC)_DEPENDS += $(SYNCD_DBG) \ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_CENTEC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd diff --git a/platform/innovium/docker-syncd-invm-rpc.mk b/platform/innovium/docker-syncd-invm-rpc.mk index 62d6891bbc21..de4cce280c70 100755 --- a/platform/innovium/docker-syncd-invm-rpc.mk +++ b/platform/innovium/docker-syncd-invm-rpc.mk @@ -10,6 +10,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_INVM_RPC) endif $(DOCKER_SYNCD_INVM_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_INVM_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_INVM_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_INVM_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_INVM_RPC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd diff --git a/platform/innovium/docker-syncd-invm.mk b/platform/innovium/docker-syncd-invm.mk index 52c11b90911d..75d0a1d4933b 100755 --- a/platform/innovium/docker-syncd-invm.mk +++ b/platform/innovium/docker-syncd-invm.mk @@ -13,4 +13,6 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk b/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk index c3ce6c10119c..4d5b445cfbf7 100644 --- a/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk +++ b/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL_RPC) endif $(DOCKER_SYNCD_MRVL_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_MRVL_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/marvell-arm64/docker-syncd-mrvl.mk b/platform/marvell-arm64/docker-syncd-mrvl.mk index dd01caab687b..2b8fc7f9d2ca 100644 --- a/platform/marvell-arm64/docker-syncd-mrvl.mk +++ b/platform/marvell-arm64/docker-syncd-mrvl.mk @@ -13,5 +13,7 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk b/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk index c3ce6c10119c..4d5b445cfbf7 100644 --- a/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk +++ b/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL_RPC) endif $(DOCKER_SYNCD_MRVL_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_MRVL_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/marvell-armhf/docker-syncd-mrvl.mk b/platform/marvell-armhf/docker-syncd-mrvl.mk index dd01caab687b..2b8fc7f9d2ca 100644 --- a/platform/marvell-armhf/docker-syncd-mrvl.mk +++ b/platform/marvell-armhf/docker-syncd-mrvl.mk @@ -13,5 +13,7 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/marvell/docker-syncd-mrvl-rpc.mk b/platform/marvell/docker-syncd-mrvl-rpc.mk index c3ce6c10119c..4d5b445cfbf7 100644 --- a/platform/marvell/docker-syncd-mrvl-rpc.mk +++ b/platform/marvell/docker-syncd-mrvl-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL_RPC) endif $(DOCKER_SYNCD_MRVL_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_MRVL_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/marvell/docker-syncd-mrvl.mk b/platform/marvell/docker-syncd-mrvl.mk index d6d7d032b8ac..4cac777bf9e5 100644 --- a/platform/marvell/docker-syncd-mrvl.mk +++ b/platform/marvell/docker-syncd-mrvl.mk @@ -13,6 +13,8 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/mellanox/docker-syncd-mlnx-rpc.mk b/platform/mellanox/docker-syncd-mlnx-rpc.mk index 806b40035f23..dcdc79d36b59 100644 --- a/platform/mellanox/docker-syncd-mlnx-rpc.mk +++ b/platform/mellanox/docker-syncd-mlnx-rpc.mk @@ -20,6 +20,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX_RPC) endif $(DOCKER_SYNCD_MLNX_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_MLNX_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/mellanox/docker-syncd-mlnx.mk b/platform/mellanox/docker-syncd-mlnx.mk index 9bdc5a8ad8ec..c98cbebc01f2 100644 --- a/platform/mellanox/docker-syncd-mlnx.mk +++ b/platform/mellanox/docker-syncd-mlnx.mk @@ -14,5 +14,7 @@ ifeq ($(SDK_FROM_SRC), y) $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(MLNX_SDK_DBG_DEBS) $(MLNX_SAI_DBGSYM) endif +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/nephos/docker-syncd-nephos-rpc.mk b/platform/nephos/docker-syncd-nephos-rpc.mk index 39240c1913e4..8d3eeb55b01c 100644 --- a/platform/nephos/docker-syncd-nephos-rpc.mk +++ b/platform/nephos/docker-syncd-nephos-rpc.mk @@ -18,6 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS_RPC) endif $(DOCKER_SYNCD_NEPHOS_RPC)_CONTAINER_NAME = syncd +$(DOCKER_SYNCD_NEPHOS_RPC)_VERSION = 1.0.0 $(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/platform/nephos/docker-syncd-nephos.mk b/platform/nephos/docker-syncd-nephos.mk index 146523ec1c64..f61320cdfaca 100644 --- a/platform/nephos/docker-syncd-nephos.mk +++ b/platform/nephos/docker-syncd-nephos.mk @@ -10,10 +10,12 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ $(LIBSWSSCOMMON_DBG) \ $(LIBSAIMETADATA_DBG) \ $(LIBSAIREDIS_DBG) - + SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd diff --git a/platform/vs/docker-gbsyncd-vs.mk b/platform/vs/docker-gbsyncd-vs.mk index 2013132d6281..b19fad685009 100644 --- a/platform/vs/docker-gbsyncd-vs.mk +++ b/platform/vs/docker-gbsyncd-vs.mk @@ -11,4 +11,5 @@ $(DOCKER_GBSYNCD_BASE)_DBG_DEPENDS += $(SYNCD_VS_DBG) \ $(LIBSAIREDIS_DBG) \ $(LIBSAIVS_DBG) +$(DOCKER_GBSYNCD_BASE)_VERSION = 1.0.0 $(DOCKER_GBSYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/platform/vs/docker-syncd-vs.mk b/platform/vs/docker-syncd-vs.mk index 15d94c5854d2..3dd112ad4e91 100644 --- a/platform/vs/docker-syncd-vs.mk +++ b/platform/vs/docker-syncd-vs.mk @@ -11,4 +11,6 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_VS_DBG) \ $(LIBSAIREDIS_DBG) \ $(LIBSAIVS_DBG) +$(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 + $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/rules/docker-database.mk b/rules/docker-database.mk index 0a2f46d19223..ab2ce3582662 100644 --- a/rules/docker-database.mk +++ b/rules/docker-database.mk @@ -12,6 +12,8 @@ $(DOCKER_DATABASE)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMA $(DOCKER_DATABASE)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_DATABASE)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_DATABASE) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_DATABASE) diff --git a/rules/docker-dhcp-relay.mk b/rules/docker-dhcp-relay.mk index 860928bf8176..0412d2550247 100644 --- a/rules/docker-dhcp-relay.mk +++ b/rules/docker-dhcp-relay.mk @@ -14,6 +14,8 @@ $(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_I $(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_DHCP_RELAY)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY) diff --git a/rules/docker-fpm-frr.mk b/rules/docker-fpm-frr.mk index 833d510245ea..07516ef0a1e5 100644 --- a/rules/docker-fpm-frr.mk +++ b/rules/docker-fpm-frr.mk @@ -16,6 +16,8 @@ $(DOCKER_FPM_FRR)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAG $(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_FPM_FRR)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_FPM_FRR) SONIC_DOCKER_DBG_IMAGES += $(DOCKER_FPM_FRR_DBG) diff --git a/rules/docker-fpm-gobgp.mk b/rules/docker-fpm-gobgp.mk index 03ec88e85b56..8a285f3a6dc9 100644 --- a/rules/docker-fpm-gobgp.mk +++ b/rules/docker-fpm-gobgp.mk @@ -4,6 +4,9 @@ DOCKER_FPM_GOBGP = docker-fpm-gobgp.gz $(DOCKER_FPM_GOBGP)_PATH = $(DOCKERS_PATH)/docker-fpm-gobgp $(DOCKER_FPM_GOBGP)_DEPENDS += $(GOBGP) $(DOCKER_FPM_GOBGP)_LOAD_DOCKERS += $(DOCKER_FPM_QUAGGA) + +$(DOCKER_FPM_GOBGP)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_FPM_GOBGP) $(DOCKER_FPM_GOBGP)_CONTAINER_NAME = bgp diff --git a/rules/docker-fpm-quagga.mk b/rules/docker-fpm-quagga.mk index 5a384eedab2c..ec77e7c32928 100644 --- a/rules/docker-fpm-quagga.mk +++ b/rules/docker-fpm-quagga.mk @@ -4,6 +4,9 @@ DOCKER_FPM_QUAGGA = docker-fpm-quagga.gz $(DOCKER_FPM_QUAGGA)_PATH = $(DOCKERS_PATH)/docker-fpm-quagga $(DOCKER_FPM_QUAGGA)_DEPENDS += $(QUAGGA) $(SWSS) $(DOCKER_FPM_QUAGGA)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE) + +$(DOCKER_FPM_QUAGGA)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_FPM_QUAGGA) $(DOCKER_FPM_QUAGGA)_CONTAINER_NAME = bgp diff --git a/rules/docker-iccpd.mk b/rules/docker-iccpd.mk index da77d9c9c1fd..aa29bdc3050e 100644 --- a/rules/docker-iccpd.mk +++ b/rules/docker-iccpd.mk @@ -10,6 +10,8 @@ $(DOCKER_ICCPD)_DBG_DEPENDS += $(SWSS_DBG) $(LIBSWSSCOMMON_DBG) $(ICCPD_DBG) $(DOCKER_ICCPD)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) $(DOCKER_ICCPD)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_ICCPD)_VERSION = 1.0.0 + ifeq ($(INCLUDE_ICCPD), y) SONIC_DOCKER_IMAGES += $(DOCKER_ICCPD) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ICCPD) diff --git a/rules/docker-lldp.mk b/rules/docker-lldp.mk index 36c8a3a3536d..2ccf375e25cd 100644 --- a/rules/docker-lldp.mk +++ b/rules/docker-lldp.mk @@ -16,6 +16,8 @@ $(DOCKER_LLDP)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_P $(DOCKER_LLDP)_PYTHON_WHEELS += $(DBSYNCD_PY2) $(DOCKER_LLDP)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_LLDP)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_LLDP) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_LLDP) diff --git a/rules/docker-nat.mk b/rules/docker-nat.mk index 981019dbcdb6..e84174088f0b 100644 --- a/rules/docker-nat.mk +++ b/rules/docker-nat.mk @@ -13,6 +13,8 @@ $(DOCKER_NAT)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PA $(DOCKER_NAT)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_NAT)_VERSION = 1.0.0 + ifeq ($(INCLUDE_NAT), y) SONIC_DOCKER_IMAGES += $(DOCKER_NAT) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_NAT) diff --git a/rules/docker-orchagent.mk b/rules/docker-orchagent.mk index 5e2e08ee2437..91e9ea1623a0 100644 --- a/rules/docker-orchagent.mk +++ b/rules/docker-orchagent.mk @@ -17,6 +17,8 @@ $(DOCKER_ORCHAGENT)_PATH = $(DOCKERS_PATH)/$(DOCKER_ORCHAGENT_STEM) $(DOCKER_ORCHAGENT)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_ORCHAGENT)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT) diff --git a/rules/docker-platform-monitor.mk b/rules/docker-platform-monitor.mk index afe27d70e492..1307d0dee62b 100644 --- a/rules/docker-platform-monitor.mk +++ b/rules/docker-platform-monitor.mk @@ -35,6 +35,8 @@ $(DOCKER_PLATFORM_MONITOR)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_PLATFORM_MONITOR)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_PLATFORM_MONITOR) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_PLATFORM_MONITOR) diff --git a/rules/docker-restapi.mk b/rules/docker-restapi.mk index ef56789dd759..d9d6bb34a311 100644 --- a/rules/docker-restapi.mk +++ b/rules/docker-restapi.mk @@ -10,6 +10,8 @@ $(DOCKER_RESTAPI)_PATH = $(DOCKERS_PATH)/$(DOCKER_RESTAPI_STEM) $(DOCKER_RESTAPI)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH) +$(DOCKER_RESTAPI)_VERSION = 1.0.0 + ifeq ($(INCLUDE_RESTAPI), y) SONIC_DOCKER_IMAGES += $(DOCKER_RESTAPI) SONIC_STRETCH_DOCKERS += $(DOCKER_RESTAPI) diff --git a/rules/docker-router-advertiser.mk b/rules/docker-router-advertiser.mk index 3b9f7ae8ba01..adc06f4ea5f5 100644 --- a/rules/docker-router-advertiser.mk +++ b/rules/docker-router-advertiser.mk @@ -13,6 +13,8 @@ $(DOCKER_ROUTER_ADVERTISER)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER $(DOCKER_ROUTER_ADVERTISER)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_ROUTER_ADVERTISER)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_ROUTER_ADVERTISER) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ROUTER_ADVERTISER) diff --git a/rules/docker-sflow.mk b/rules/docker-sflow.mk index 6888304b8bce..9a909e2d4723 100644 --- a/rules/docker-sflow.mk +++ b/rules/docker-sflow.mk @@ -13,6 +13,8 @@ $(DOCKER_SFLOW)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_ $(DOCKER_SFLOW)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_SFLOW)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_SFLOW) ifeq ($(INCLUDE_SFLOW), y) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SFLOW) diff --git a/rules/docker-snmp.mk b/rules/docker-snmp.mk index 3493a2dfa337..7241f688faf9 100644 --- a/rules/docker-snmp.mk +++ b/rules/docker-snmp.mk @@ -17,6 +17,8 @@ $(DOCKER_SNMP)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_P $(DOCKER_SNMP)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_PY3) $(SWSSSDK_PY3) $(ASYNCSNMP_PY3) $(DOCKER_SNMP)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_SNMP)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_SNMP) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SNMP) diff --git a/rules/docker-sonic-mgmt-framework.mk b/rules/docker-sonic-mgmt-framework.mk index 65bac8bd9ddc..d0137ee034fb 100644 --- a/rules/docker-sonic-mgmt-framework.mk +++ b/rules/docker-sonic-mgmt-framework.mk @@ -13,6 +13,9 @@ $(DOCKER_MGMT_FRAMEWORK)_DBG_DEPENDS += $(SONIC_MGMT_FRAMEWORK_DBG) SONIC_DOCKER_IMAGES += $(DOCKER_MGMT_FRAMEWORK) $(DOCKER_MGMT_FRAMEWORK)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) + +$(DOCKER_MGMT_FRAMEWORK)_VERSION = 1.0.0 + $(DOCKER_MGMT_FRAMEWORK)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) ifeq ($(INCLUDE_MGMT_FRAMEWORK), y) diff --git a/rules/docker-teamd.mk b/rules/docker-teamd.mk index 5442d5bf6b3f..63c12196d5d6 100644 --- a/rules/docker-teamd.mk +++ b/rules/docker-teamd.mk @@ -15,6 +15,8 @@ $(DOCKER_TEAMD)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_ $(DOCKER_TEAMD)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) +$(DOCKER_TEAMD)_VERSION = 1.0.0 + SONIC_DOCKER_IMAGES += $(DOCKER_TEAMD) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_TEAMD) diff --git a/rules/docker-telemetry.mk b/rules/docker-telemetry.mk index 15f90c74c810..dcd02a665722 100644 --- a/rules/docker-telemetry.mk +++ b/rules/docker-telemetry.mk @@ -11,6 +11,9 @@ $(DOCKER_TELEMETRY)_DEPENDS += $(SONIC_TELEMETRY) $(DOCKER_TELEMETRY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) $(DOCKER_TELEMETRY)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) + +$(DOCKER_TELEMETRY)_VERSION = 1.0.0 + $(DOCKER_TELEMETRY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) SONIC_DOCKER_IMAGES += $(DOCKER_TELEMETRY) diff --git a/slave.mk b/slave.mk index 88d64e6bc409..173e2716f8c2 100644 --- a/slave.mk +++ b/slave.mk @@ -868,7 +868,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ export enable_pfcwd_on_start="$(ENABLE_PFCWD_ON_START)" export installer_debs="$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$($*_INSTALLS))" export lazy_installer_debs="$(foreach deb, $($*_LAZY_INSTALLS),$(foreach device, $($(deb)_PLATFORM),$(addprefix $(device)@, $(IMAGE_DISTRO_DEBS_PATH)/$(deb))))" - export installer_images="$(addprefix $(TARGET_PATH)/,$($*_DOCKERS))" + export installer_images="$(foreach docker, $($*_DOCKERS),$(addprefix $(TARGET_PATH)/,$(addsuffix :$($(docker)_VERSION),$(docker))))" export sonic_py_common_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PY_COMMON_PY2))" export sonic_py_common_py3_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PY_COMMON_PY3))" export config_engine_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE_PY2))" From 954cad9f40d18b8967aba0e92baca99b06bd11e8 Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak Date: Tue, 3 Nov 2020 13:45:50 +0200 Subject: [PATCH 03/21] [dockers] label SONiC Docker with manifest Signed-off-by: Stepan Blyshchak --- dockers/docker-database/Dockerfile.j2 | 4 + dockers/docker-database/manifest.json.j2 | 12 +++ dockers/docker-dhcp-relay/Dockerfile.j2 | 4 + dockers/docker-dhcp-relay/manifest.json.j2 | 13 +++ dockers/docker-fpm-frr/Dockerfile.j2 | 4 + dockers/docker-fpm-frr/manifest.json.j2 | 14 ++++ dockers/docker-fpm-gobgp/Dockerfile.j2 | 5 ++ dockers/docker-fpm-gobgp/manifest.json.j2 | 14 ++++ dockers/docker-fpm-quagga/Dockerfile.j2 | 4 + dockers/docker-fpm-quagga/manifest.json.j2 | 14 ++++ dockers/docker-iccpd/Dockerfile.j2 | 4 + dockers/docker-iccpd/manifest.json.j2 | 13 +++ dockers/docker-lldp/Dockerfile.j2 | 4 + dockers/docker-lldp/manifest.json.j2 | 13 +++ dockers/docker-nat/Dockerfile.j2 | 4 + dockers/docker-nat/manifest.json.j2 | 13 +++ dockers/docker-orchagent/Dockerfile.j2 | 4 + dockers/docker-orchagent/manifest.json.j2 | 13 +++ dockers/docker-platform-monitor/Dockerfile.j2 | 4 + .../docker-platform-monitor/manifest.json.j2 | 13 +++ .../docker-router-advertiser/Dockerfile.j2 | 4 + .../docker-router-advertiser/manifest.json.j2 | 13 +++ dockers/docker-sflow/Dockerfile.j2 | 4 + dockers/docker-sflow/manifest.json.j2 | 13 +++ dockers/docker-snmp/Dockerfile.j2 | 4 + dockers/docker-snmp/manifest.json.j2 | 13 +++ .../docker-sonic-mgmt-framework/Dockerfile.j2 | 4 + .../manifest.json.j2 | 13 +++ dockers/docker-sonic-restapi/Dockerfile.j2 | 4 + dockers/docker-sonic-restapi/manifest.json.j2 | 13 +++ dockers/docker-sonic-sdk/Dockerfile.j2 | 79 +++++++++++++++++++ dockers/docker-sonic-telemetry/Dockerfile.j2 | 4 + .../docker-sonic-telemetry/manifest.json.j2 | 13 +++ dockers/docker-teamd/Dockerfile.j2 | 4 + dockers/docker-teamd/manifest.json.j2 | 13 +++ files/build_templates/packages.json.j2 | 17 ++++ .../build_templates/sonic_debian_extension.j2 | 8 +- platform/barefoot/docker-syncd-bfn-rpc.mk | 1 + platform/barefoot/docker-syncd-bfn.mk | 1 + .../barefoot/docker-syncd-bfn/Dockerfile.j2 | 5 ++ .../docker-syncd-bfn/manifest.json.j2 | 1 + platform/broadcom/docker-syncd-brcm-rpc.mk | 1 + platform/broadcom/docker-syncd-brcm.mk | 1 + .../broadcom/docker-syncd-brcm/Dockerfile.j2 | 4 + .../docker-syncd-brcm/manifest.json.j2 | 1 + platform/cavium/docker-syncd-cavm-rpc.mk | 1 + platform/cavium/docker-syncd-cavm.mk | 1 + .../cavium/docker-syncd-cavm/Dockerfile.j2 | 4 + .../cavium/docker-syncd-cavm/manifest.json.j2 | 1 + .../centec-arm64/docker-syncd-centec-rpc.mk | 1 + platform/centec-arm64/docker-syncd-centec.mk | 1 + .../docker-syncd-centec/Dockerfile.j2 | 4 + .../docker-syncd-centec/manifest.json.j2 | 1 + platform/centec/docker-syncd-centec-rpc.mk | 1 + platform/centec/docker-syncd-centec.mk | 1 + .../centec/docker-syncd-centec/Dockerfile.j2 | 4 + .../docker-syncd-centec/manifest.json.j2 | 1 + platform/innovium/docker-syncd-invm-rpc.mk | 1 + platform/innovium/docker-syncd-invm.mk | 1 + .../innovium/docker-syncd-invm/Dockerfile.j2 | 4 + .../docker-syncd-invm/manifest.json.j2 | 1 + .../marvell-arm64/docker-syncd-mrvl-rpc.mk | 1 + platform/marvell-arm64/docker-syncd-mrvl.mk | 1 + .../docker-syncd-mrvl/Dockerfile.j2 | 4 + .../docker-syncd-mrvl/manifest.json.j2 | 1 + .../marvell-armhf/docker-syncd-mrvl-rpc.mk | 1 + platform/marvell-armhf/docker-syncd-mrvl.mk | 1 + .../docker-syncd-mrvl/Dockerfile.j2 | 4 + .../docker-syncd-mrvl/manifest.json.j2 | 1 + platform/marvell/docker-syncd-mrvl-rpc.mk | 1 + platform/marvell/docker-syncd-mrvl.mk | 1 + .../marvell/docker-syncd-mrvl/Dockerfile.j2 | 4 + .../docker-syncd-mrvl/manifest.json.j2 | 1 + platform/mellanox/docker-syncd-mlnx-rpc.mk | 1 + platform/mellanox/docker-syncd-mlnx.mk | 1 + .../mellanox/docker-syncd-mlnx/Dockerfile.j2 | 4 + .../docker-syncd-mlnx/manifest.json.j2 | 1 + platform/nephos/docker-syncd-nephos-rpc.mk | 1 + platform/nephos/docker-syncd-nephos.mk | 1 + .../nephos/docker-syncd-nephos/Dockerfile.j2 | 4 + .../docker-syncd-nephos/manifest.json.j2 | 1 + platform/template/manifest.json.j2 | 13 +++ platform/vs/docker-gbsyncd-vs.mk | 2 + platform/vs/docker-gbsyncd-vs/Dockerfile.j2 | 4 + .../vs/docker-gbsyncd-vs/manifest.json.j2 | 1 + platform/vs/docker-syncd-vs.mk | 1 + platform/vs/docker-syncd-vs/Dockerfile.j2 | 4 + platform/vs/docker-syncd-vs/manifest.json.j2 | 1 + rules/docker-database.mk | 1 + rules/docker-dhcp-relay.mk | 1 + rules/docker-fpm-frr.mk | 1 + rules/docker-fpm-gobgp.mk | 1 + rules/docker-fpm-quagga.mk | 1 + rules/docker-iccpd.mk | 1 + rules/docker-lldp.mk | 1 + rules/docker-nat.mk | 1 + rules/docker-orchagent.mk | 1 + rules/docker-platform-monitor.mk | 1 + rules/docker-restapi.mk | 1 + rules/docker-router-advertiser.mk | 1 + rules/docker-sflow.mk | 1 + rules/docker-snmp.mk | 1 + rules/docker-sonic-mgmt-framework.mk | 1 + rules/docker-teamd.mk | 1 + rules/docker-telemetry.mk | 1 + slave.mk | 11 ++- 106 files changed, 526 insertions(+), 2 deletions(-) create mode 100644 dockers/docker-database/manifest.json.j2 create mode 100644 dockers/docker-dhcp-relay/manifest.json.j2 create mode 100644 dockers/docker-fpm-frr/manifest.json.j2 create mode 100644 dockers/docker-fpm-gobgp/manifest.json.j2 create mode 100644 dockers/docker-fpm-quagga/manifest.json.j2 create mode 100644 dockers/docker-iccpd/manifest.json.j2 create mode 100644 dockers/docker-lldp/manifest.json.j2 create mode 100644 dockers/docker-nat/manifest.json.j2 create mode 100644 dockers/docker-orchagent/manifest.json.j2 create mode 100644 dockers/docker-platform-monitor/manifest.json.j2 create mode 100644 dockers/docker-router-advertiser/manifest.json.j2 create mode 100644 dockers/docker-sflow/manifest.json.j2 create mode 100644 dockers/docker-snmp/manifest.json.j2 create mode 100644 dockers/docker-sonic-mgmt-framework/manifest.json.j2 create mode 100644 dockers/docker-sonic-restapi/manifest.json.j2 create mode 100644 dockers/docker-sonic-sdk/Dockerfile.j2 create mode 100644 dockers/docker-sonic-telemetry/manifest.json.j2 create mode 100644 dockers/docker-teamd/manifest.json.j2 create mode 100644 files/build_templates/packages.json.j2 create mode 120000 platform/barefoot/docker-syncd-bfn/manifest.json.j2 create mode 120000 platform/broadcom/docker-syncd-brcm/manifest.json.j2 create mode 120000 platform/cavium/docker-syncd-cavm/manifest.json.j2 create mode 120000 platform/centec-arm64/docker-syncd-centec/manifest.json.j2 create mode 120000 platform/centec/docker-syncd-centec/manifest.json.j2 create mode 120000 platform/innovium/docker-syncd-invm/manifest.json.j2 create mode 120000 platform/marvell-arm64/docker-syncd-mrvl/manifest.json.j2 create mode 120000 platform/marvell-armhf/docker-syncd-mrvl/manifest.json.j2 create mode 120000 platform/marvell/docker-syncd-mrvl/manifest.json.j2 create mode 120000 platform/mellanox/docker-syncd-mlnx/manifest.json.j2 create mode 120000 platform/nephos/docker-syncd-nephos/manifest.json.j2 create mode 100644 platform/template/manifest.json.j2 create mode 120000 platform/vs/docker-gbsyncd-vs/manifest.json.j2 create mode 120000 platform/vs/docker-syncd-vs/manifest.json.j2 diff --git a/dockers/docker-database/Dockerfile.j2 b/dockers/docker-database/Dockerfile.j2 index 84f485e4fe83..e4121c8d1981 100644 --- a/dockers/docker-database/Dockerfile.j2 +++ b/dockers/docker-database/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Make apt-get non-interactive @@ -59,4 +61,6 @@ COPY ["files/sysctl-net.conf", "/etc/sysctl.d/"] COPY ["critical_processes", "/etc/supervisor"] COPY ["files/update_chassisdb_config", "/usr/local/bin/"] +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/docker-database-init.sh"] diff --git a/dockers/docker-database/manifest.json.j2 b/dockers/docker-database/manifest.json.j2 new file mode 100644 index 000000000000..07d43898ff12 --- /dev/null +++ b/dockers/docker-database/manifest.json.j2 @@ -0,0 +1,12 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0" + }, + "service": { + "name": "{{ name }}", + "asic-service": true, + "host-service": true + } +} diff --git a/dockers/docker-dhcp-relay/Dockerfile.j2 b/dockers/docker-dhcp-relay/Dockerfile.j2 index 58796ca79e25..b7b9a89bbdb6 100644 --- a/dockers/docker-dhcp-relay/Dockerfile.j2 +++ b/dockers/docker-dhcp-relay/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Make apt-get non-interactive @@ -29,4 +31,6 @@ COPY ["docker-dhcp-relay.supervisord.conf.j2", "port-name-alias-map.txt.j2", "wa COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/bin/docker_init.sh"] diff --git a/dockers/docker-dhcp-relay/manifest.json.j2 b/dockers/docker-dhcp-relay/manifest.json.j2 new file mode 100644 index 000000000000..a76b30f9f0ab --- /dev/null +++ b/dockers/docker-dhcp-relay/manifest.json.j2 @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0", "swss^1.0.0"] + }, + "service": { + "name": "{{ name }}", + "asic-service": false, + "host-service": true + } +} diff --git a/dockers/docker-fpm-frr/Dockerfile.j2 b/dockers/docker-fpm-frr/Dockerfile.j2 index ab8b585899f9..afe557831920 100644 --- a/dockers/docker-fpm-frr/Dockerfile.j2 +++ b/dockers/docker-fpm-frr/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + ARG frr_user_uid ARG frr_user_gid @@ -59,4 +61,6 @@ RUN chmod a+x /usr/bin/TSA && \ chmod a+x /usr/bin/TSB && \ chmod a+x /usr/bin/TSC +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/bin/docker_init.sh"] diff --git a/dockers/docker-fpm-frr/manifest.json.j2 b/dockers/docker-fpm-frr/manifest.json.j2 new file mode 100644 index 000000000000..1daeb738c784 --- /dev/null +++ b/dockers/docker-fpm-frr/manifest.json.j2 @@ -0,0 +1,14 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0", "swss^1.0.0"], + "conflicts": ["fpm-gobgp", "fpm-quagga"] + }, + "service": { + "name": "{{ name }}", + "asic-service": true, + "host-service": false + } +} diff --git a/dockers/docker-fpm-gobgp/Dockerfile.j2 b/dockers/docker-fpm-gobgp/Dockerfile.j2 index 65b104e43b26..9c8569450fa2 100644 --- a/dockers/docker-fpm-gobgp/Dockerfile.j2 +++ b/dockers/docker-fpm-gobgp/Dockerfile.j2 @@ -1,5 +1,8 @@ FROM docker-fpm-quagga +ARG docker_container_name +ARG manifest + ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive @@ -27,4 +30,6 @@ COPY ["daemons", "/etc/quagga/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-fpm-gobgp/manifest.json.j2 b/dockers/docker-fpm-gobgp/manifest.json.j2 new file mode 100644 index 000000000000..9b8a5a11870f --- /dev/null +++ b/dockers/docker-fpm-gobgp/manifest.json.j2 @@ -0,0 +1,14 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0", "swss^1.0.0"], + "conflicts": ["fpm-frr", "fpm-quagga"] + }, + "service": { + "name": "{{ name }}", + "asic-service": true, + "host-service": false + } +} diff --git a/dockers/docker-fpm-quagga/Dockerfile.j2 b/dockers/docker-fpm-quagga/Dockerfile.j2 index ac382afbe5b2..5b9aabcb411d 100644 --- a/dockers/docker-fpm-quagga/Dockerfile.j2 +++ b/dockers/docker-fpm-quagga/Dockerfile.j2 @@ -1,6 +1,8 @@ FROM docker-config-engine ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Make apt-get non-interactive @@ -36,4 +38,6 @@ COPY ["*.j2", "/usr/share/sonic/templates/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-fpm-quagga/manifest.json.j2 b/dockers/docker-fpm-quagga/manifest.json.j2 new file mode 100644 index 000000000000..cd5734259e46 --- /dev/null +++ b/dockers/docker-fpm-quagga/manifest.json.j2 @@ -0,0 +1,14 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0", "swss^1.0.0"], + "conflicts": ["fpm-gobgp", "fpm-frr"] + }, + "service": { + "name": "{{ name }}", + "asic-service": true, + "host-service": false + } +} diff --git a/dockers/docker-iccpd/Dockerfile.j2 b/dockers/docker-iccpd/Dockerfile.j2 index 51cc306bdd55..0a42ee0d0a0d 100644 --- a/dockers/docker-iccpd/Dockerfile.j2 +++ b/dockers/docker-iccpd/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -31,4 +33,6 @@ RUN apt-get clean -y && \ apt-get autoremove -y && \ rm -rf /debs +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-iccpd/manifest.json.j2 b/dockers/docker-iccpd/manifest.json.j2 new file mode 100644 index 000000000000..a76b30f9f0ab --- /dev/null +++ b/dockers/docker-iccpd/manifest.json.j2 @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0", "swss^1.0.0"] + }, + "service": { + "name": "{{ name }}", + "asic-service": false, + "host-service": true + } +} diff --git a/dockers/docker-lldp/Dockerfile.j2 b/dockers/docker-lldp/Dockerfile.j2 index 1306582b0aad..a066dc4c68de 100644 --- a/dockers/docker-lldp/Dockerfile.j2 +++ b/dockers/docker-lldp/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Make apt-get non-interactive @@ -44,4 +46,6 @@ COPY ["lldpmgrd", "/usr/bin/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/bin/docker-lldp-init.sh"] diff --git a/dockers/docker-lldp/manifest.json.j2 b/dockers/docker-lldp/manifest.json.j2 new file mode 100644 index 000000000000..d86a71f9f781 --- /dev/null +++ b/dockers/docker-lldp/manifest.json.j2 @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0", "swss^1.0.0"] + }, + "service": { + "name": "{{ name }}", + "asic-service": true, + "host-service": true + } +} diff --git a/dockers/docker-nat/Dockerfile.j2 b/dockers/docker-nat/Dockerfile.j2 index 36a178a68af2..6281ffec2749 100644 --- a/dockers/docker-nat/Dockerfile.j2 +++ b/dockers/docker-nat/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf RUN echo @@ -35,4 +37,6 @@ COPY ["critical_processes", "/etc/supervisor"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-nat/manifest.json.j2 b/dockers/docker-nat/manifest.json.j2 new file mode 100644 index 000000000000..a76b30f9f0ab --- /dev/null +++ b/dockers/docker-nat/manifest.json.j2 @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0", "swss^1.0.0"] + }, + "service": { + "name": "{{ name }}", + "asic-service": false, + "host-service": true + } +} diff --git a/dockers/docker-orchagent/Dockerfile.j2 b/dockers/docker-orchagent/Dockerfile.j2 index b046afedbe7d..a84b50cb2356 100755 --- a/dockers/docker-orchagent/Dockerfile.j2 +++ b/dockers/docker-orchagent/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Make apt-get non-interactive @@ -79,4 +81,6 @@ COPY ["critical_processes", "/etc/supervisor/"] # Copy all Jinja2 template files into the templates folder COPY ["*.j2", "/usr/share/sonic/templates/"] +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/bin/docker-init.sh"] diff --git a/dockers/docker-orchagent/manifest.json.j2 b/dockers/docker-orchagent/manifest.json.j2 new file mode 100644 index 000000000000..6f81022833a3 --- /dev/null +++ b/dockers/docker-orchagent/manifest.json.j2 @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0", "syncd^1.0.0"] + }, + "service": { + "name": "{{ name }}", + "asic-service": true, + "host-service": false + } +} diff --git a/dockers/docker-platform-monitor/Dockerfile.j2 b/dockers/docker-platform-monitor/Dockerfile.j2 index 7659ee4d35be..cedd41540dd6 100755 --- a/dockers/docker-platform-monitor/Dockerfile.j2 +++ b/dockers/docker-platform-monitor/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Make apt-get non-interactive @@ -73,4 +75,6 @@ COPY ["ssd_tools/*", "/usr/bin/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/bin/docker_init.sh"] diff --git a/dockers/docker-platform-monitor/manifest.json.j2 b/dockers/docker-platform-monitor/manifest.json.j2 new file mode 100644 index 000000000000..82f296666838 --- /dev/null +++ b/dockers/docker-platform-monitor/manifest.json.j2 @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0"] + }, + "service": { + "name": "{{ name }}", + "asic-service": false, + "host-service": true + } +} diff --git a/dockers/docker-router-advertiser/Dockerfile.j2 b/dockers/docker-router-advertiser/Dockerfile.j2 index 38962865567d..b640dab65eac 100644 --- a/dockers/docker-router-advertiser/Dockerfile.j2 +++ b/dockers/docker-router-advertiser/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Make apt-get non-interactive @@ -32,4 +34,6 @@ COPY ["radvd.conf.j2", "wait_for_link.sh.j2", "docker-router-advertiser.supervis COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/bin/docker-init.sh"] diff --git a/dockers/docker-router-advertiser/manifest.json.j2 b/dockers/docker-router-advertiser/manifest.json.j2 new file mode 100644 index 000000000000..a76b30f9f0ab --- /dev/null +++ b/dockers/docker-router-advertiser/manifest.json.j2 @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0", "swss^1.0.0"] + }, + "service": { + "name": "{{ name }}", + "asic-service": false, + "host-service": true + } +} diff --git a/dockers/docker-sflow/Dockerfile.j2 b/dockers/docker-sflow/Dockerfile.j2 index 476ff3514ace..5181e7db93bf 100644 --- a/dockers/docker-sflow/Dockerfile.j2 +++ b/dockers/docker-sflow/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -32,4 +34,6 @@ COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] COPY ["port_index_mapper.py", "/usr/bin"] +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-sflow/manifest.json.j2 b/dockers/docker-sflow/manifest.json.j2 new file mode 100644 index 000000000000..a76b30f9f0ab --- /dev/null +++ b/dockers/docker-sflow/manifest.json.j2 @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0", "swss^1.0.0"] + }, + "service": { + "name": "{{ name }}", + "asic-service": false, + "host-service": true + } +} diff --git a/dockers/docker-snmp/Dockerfile.j2 b/dockers/docker-snmp/Dockerfile.j2 index d479392bb259..7424eaaf08bc 100644 --- a/dockers/docker-snmp/Dockerfile.j2 +++ b/dockers/docker-snmp/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Enable -O for all Python calls @@ -76,4 +78,6 @@ COPY ["critical_processes", "/etc/supervisor"] # Although exposing ports is not needed for host net mode, keep it for possible bridge mode EXPOSE 161/udp 162/udp +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-snmp/manifest.json.j2 b/dockers/docker-snmp/manifest.json.j2 new file mode 100644 index 000000000000..a76b30f9f0ab --- /dev/null +++ b/dockers/docker-snmp/manifest.json.j2 @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0", "swss^1.0.0"] + }, + "service": { + "name": "{{ name }}", + "asic-service": false, + "host-service": true + } +} diff --git a/dockers/docker-sonic-mgmt-framework/Dockerfile.j2 b/dockers/docker-sonic-mgmt-framework/Dockerfile.j2 index 29f1c05cd26a..676214d60a46 100644 --- a/dockers/docker-sonic-mgmt-framework/Dockerfile.j2 +++ b/dockers/docker-sonic-mgmt-framework/Dockerfile.j2 @@ -1,6 +1,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -36,4 +38,6 @@ RUN apt-get remove -y g++ python-dev RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-sonic-mgmt-framework/manifest.json.j2 b/dockers/docker-sonic-mgmt-framework/manifest.json.j2 new file mode 100644 index 000000000000..a76b30f9f0ab --- /dev/null +++ b/dockers/docker-sonic-mgmt-framework/manifest.json.j2 @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0", "swss^1.0.0"] + }, + "service": { + "name": "{{ name }}", + "asic-service": false, + "host-service": true + } +} diff --git a/dockers/docker-sonic-restapi/Dockerfile.j2 b/dockers/docker-sonic-restapi/Dockerfile.j2 index 837796e66d82..b3b5542dff3b 100644 --- a/dockers/docker-sonic-restapi/Dockerfile.j2 +++ b/dockers/docker-sonic-restapi/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-stretch ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -25,4 +27,6 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-sonic-restapi/manifest.json.j2 b/dockers/docker-sonic-restapi/manifest.json.j2 new file mode 100644 index 000000000000..a76b30f9f0ab --- /dev/null +++ b/dockers/docker-sonic-restapi/manifest.json.j2 @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0", "swss^1.0.0"] + }, + "service": { + "name": "{{ name }}", + "asic-service": false, + "host-service": true + } +} diff --git a/dockers/docker-sonic-sdk/Dockerfile.j2 b/dockers/docker-sonic-sdk/Dockerfile.j2 new file mode 100644 index 000000000000..b74aec7f1973 --- /dev/null +++ b/dockers/docker-sonic-sdk/Dockerfile.j2 @@ -0,0 +1,79 @@ +{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} +FROM docker-config-engine-buster + +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && \ + apt-get install -f -y \ + ifupdown \ + arping \ + libdbus-1-3 \ + libdaemon0 \ + libjansson4 \ + libpython2.7 \ + iproute2 \ + ndisc6 \ + tcpdump \ + libatomic1 \ + libjemalloc1 \ + liblua5.1-0 \ + lua-bitop \ + lua-cjson \ + libelf1 \ + libmnl0 \ + bridge-utils + + +## Build tools +RUN apt-get update && \ + apt-get install -f -y \ + autoconf \ + automake \ + libtool \ + curl \ + make \ + g++ \ + gcc \ + vim \ + git \ + unzip + +{% if ( CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" ) %} +## Fix for gcc/python not found in arm docker +RUN apt-get install -f -y python2.7 python2.7-dev +RUN apt-get install -y gcc-6 +{% endif %} +{% if CONFIGURED_ARCH == "armhf" %} +RUN ln -s -f /usr/bin/gcc-6 /usr/bin/arm-linux-gnueabihf-gcc +{% endif %} +{% if CONFIGURED_ARCH == "arm64" %} +RUN ln -s -f /usr/bin/gcc-6 /usr/bin/aarch64-linux-gnu-gcc +{% endif %} + +#RUN pip install \ +# scapy==2.4.2 \ +# setuptools \ +# pyroute2==0.5.3 +#RUN pip install \ +# netifaces==0.10.7 \ +# monotonic==1.5 + +{% if ( CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" ) %} +# Remove installed gcc +RUN apt-get remove -y gcc-6 +{% endif %} + +{% if docker_sonic_sdk_debs.strip() -%} +# Copy locally-built Debian package dependencies +{{ copy_files("debs/", docker_sonic_sdk_debs.split(' '), "/debs/") }} + +# Install locally-built Debian packages and implicitly install their dependencies +{{ install_debian_packages(docker_sonic_sdk_debs.split(' ')) }} +{%- endif %} + +## Clean up +RUN apt-get clean -y && \ + apt-get autoclean -y && \ + apt-get autoremove -y && \ + rm -rf /debs diff --git a/dockers/docker-sonic-telemetry/Dockerfile.j2 b/dockers/docker-sonic-telemetry/Dockerfile.j2 index 65e436d293d7..92c8da954e6f 100644 --- a/dockers/docker-sonic-telemetry/Dockerfile.j2 +++ b/dockers/docker-sonic-telemetry/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -28,4 +30,6 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-sonic-telemetry/manifest.json.j2 b/dockers/docker-sonic-telemetry/manifest.json.j2 new file mode 100644 index 000000000000..a76b30f9f0ab --- /dev/null +++ b/dockers/docker-sonic-telemetry/manifest.json.j2 @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0", "swss^1.0.0"] + }, + "service": { + "name": "{{ name }}", + "asic-service": false, + "host-service": true + } +} diff --git a/dockers/docker-teamd/Dockerfile.j2 b/dockers/docker-teamd/Dockerfile.j2 index 7f4db2936857..29f8cb3955f0 100644 --- a/dockers/docker-teamd/Dockerfile.j2 +++ b/dockers/docker-teamd/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -27,4 +29,6 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-teamd/manifest.json.j2 b/dockers/docker-teamd/manifest.json.j2 new file mode 100644 index 000000000000..4766bbde8b26 --- /dev/null +++ b/dockers/docker-teamd/manifest.json.j2 @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0", "swss^1.0.0"] + }, + "service": { + "name": "{{ name }}", + "asic-service": true, + "host-service": false + } +} diff --git a/files/build_templates/packages.json.j2 b/files/build_templates/packages.json.j2 new file mode 100644 index 000000000000..3c0d1034031a --- /dev/null +++ b/files/build_templates/packages.json.j2 @@ -0,0 +1,17 @@ +{ +{% for docker_installation_target in installer_images.strip().split() -%} +{% set pkgname, docker_build_path, image = docker_installation_target.split('|') -%} +{% set imagefilepath = image.split(':')|first -%} +{% set imageversion = image.split(':')|last -%} +{% set imagefilename = imagefilepath.split('/')|last -%} +{% set imagename = imagefilename.split('.')|first -%} + "{{ pkgname }}": { + "repository": "{{ imagename }}", + "description": "SONiC {{ pkgname }} package", + "default-reference": "{{ imageversion }}", + "installed-version": "{{ imageversion }}", + "built-in": true, + "installed": true + }{% if not loop.last %},{% endif %} +{% endfor %} +} diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 1321ab2d4db3..4716c6f3abf9 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -522,7 +522,9 @@ sudo mount proc /proc -t proc sudo mkdir $FILESYSTEM_ROOT/target sudo mount --bind target $FILESYSTEM_ROOT/target sudo chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS info -{% for image in installer_images.strip().split(' ') -%} + +{% for docker_installation_target in installer_images.strip().split() -%} +{% set pkgname, docker_build_path, image = docker_installation_target.split('|') %} {% set imagefilepath = image.split(':')|first -%} {% set imageversion = image.split(':')|last -%} {% set imagefilename = imagefilepath.split('/')|last -%} @@ -536,6 +538,10 @@ sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS ta {% endif %} {% endfor %} +SONIC_PACKAGE_MANAGER_FOLDER="/var/lib/sonic-package-manager/" +sudo mkdir -p $FILESYSTEM_ROOT/$SONIC_PACKAGE_MANAGER_FOLDER +j2 $BUILD_TEMPLATES/packages.json.j2 | sudo tee $FILESYSTEM_ROOT/$SONIC_PACKAGE_MANAGER_FOLDER/packages.json + {% if include_kubernetes == "y" %} ## Pull in kubernetes docker images echo "pulling universal k8s images ..." diff --git a/platform/barefoot/docker-syncd-bfn-rpc.mk b/platform/barefoot/docker-syncd-bfn-rpc.mk index 41c55b1bcf7d..98486f2420f7 100644 --- a/platform/barefoot/docker-syncd-bfn-rpc.mk +++ b/platform/barefoot/docker-syncd-bfn-rpc.mk @@ -19,6 +19,7 @@ endif $(DOCKER_SYNCD_BFN_RPC)_CONTAINER_NAME = syncd $(DOCKER_SYNCD_BFN_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BFN_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/barefoot/docker-syncd-bfn.mk b/platform/barefoot/docker-syncd-bfn.mk index d3d018393b47..ffb373978269 100644 --- a/platform/barefoot/docker-syncd-bfn.mk +++ b/platform/barefoot/docker-syncd-bfn.mk @@ -11,6 +11,7 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \ $(LIBSAIREDIS_DBG) $(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BASE)_PACKAGE_NAME = syncd SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) diff --git a/platform/barefoot/docker-syncd-bfn/Dockerfile.j2 b/platform/barefoot/docker-syncd-bfn/Dockerfile.j2 index b4bcafe5926a..af70b1a1debe 100755 --- a/platform/barefoot/docker-syncd-bfn/Dockerfile.j2 +++ b/platform/barefoot/docker-syncd-bfn/Dockerfile.j2 @@ -1,5 +1,8 @@ FROM docker-config-engine-stretch +ARG docker_container_name +ARG manifest + ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive @@ -36,4 +39,6 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/barefoot/docker-syncd-bfn/manifest.json.j2 b/platform/barefoot/docker-syncd-bfn/manifest.json.j2 new file mode 120000 index 000000000000..affca28ad9a9 --- /dev/null +++ b/platform/barefoot/docker-syncd-bfn/manifest.json.j2 @@ -0,0 +1 @@ +../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/broadcom/docker-syncd-brcm-rpc.mk b/platform/broadcom/docker-syncd-brcm-rpc.mk index ca9bfaac54dd..ec54a70bbd4c 100644 --- a/platform/broadcom/docker-syncd-brcm-rpc.mk +++ b/platform/broadcom/docker-syncd-brcm-rpc.mk @@ -19,6 +19,7 @@ endif $(DOCKER_SYNCD_BRCM_RPC)_CONTAINER_NAME = syncd $(DOCKER_SYNCD_BRCM_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BRCM_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/platform/broadcom/docker-syncd-brcm.mk b/platform/broadcom/docker-syncd-brcm.mk index 3b59a99f9131..ad39fa23d0a2 100644 --- a/platform/broadcom/docker-syncd-brcm.mk +++ b/platform/broadcom/docker-syncd-brcm.mk @@ -15,6 +15,7 @@ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) $(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BASE)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 b/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 index 35b3d352a827..81b5d6ccc5a8 100755 --- a/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 +++ b/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-stretch ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -32,4 +34,6 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/broadcom/docker-syncd-brcm/manifest.json.j2 b/platform/broadcom/docker-syncd-brcm/manifest.json.j2 new file mode 120000 index 000000000000..affca28ad9a9 --- /dev/null +++ b/platform/broadcom/docker-syncd-brcm/manifest.json.j2 @@ -0,0 +1 @@ +../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/cavium/docker-syncd-cavm-rpc.mk b/platform/cavium/docker-syncd-cavm-rpc.mk index 10a47d31b32b..5112c1b39006 100644 --- a/platform/cavium/docker-syncd-cavm-rpc.mk +++ b/platform/cavium/docker-syncd-cavm-rpc.mk @@ -18,6 +18,7 @@ endif $(DOCKER_SYNCD_CAVM_RPC)_CONTAINER_NAME = syncd $(DOCKER_SYNCD_CAVM_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_CAVM_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_CAVM_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_CAVM_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_CAVM_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/cavium/docker-syncd-cavm.mk b/platform/cavium/docker-syncd-cavm.mk index 02b1a6d73f83..18db07686628 100644 --- a/platform/cavium/docker-syncd-cavm.mk +++ b/platform/cavium/docker-syncd-cavm.mk @@ -17,6 +17,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM) endif $(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BASE)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_CAVM)_CONTAINER_NAME = syncd $(DOCKER_SYNCD_CAVM)_RUN_OPT += --net=host --privileged -t diff --git a/platform/cavium/docker-syncd-cavm/Dockerfile.j2 b/platform/cavium/docker-syncd-cavm/Dockerfile.j2 index fcf82276ad1a..3a93f9acb23f 100755 --- a/platform/cavium/docker-syncd-cavm/Dockerfile.j2 +++ b/platform/cavium/docker-syncd-cavm/Dockerfile.j2 @@ -1,6 +1,8 @@ FROM docker-config-engine ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -32,4 +34,6 @@ COPY ["profile.ini", "/etc/ssw/AS7512/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/cavium/docker-syncd-cavm/manifest.json.j2 b/platform/cavium/docker-syncd-cavm/manifest.json.j2 new file mode 120000 index 000000000000..affca28ad9a9 --- /dev/null +++ b/platform/cavium/docker-syncd-cavm/manifest.json.j2 @@ -0,0 +1 @@ +../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/centec-arm64/docker-syncd-centec-rpc.mk b/platform/centec-arm64/docker-syncd-centec-rpc.mk index e66089249622..9d848f7523e7 100755 --- a/platform/centec-arm64/docker-syncd-centec-rpc.mk +++ b/platform/centec-arm64/docker-syncd-centec-rpc.mk @@ -19,6 +19,7 @@ endif $(DOCKER_SYNCD_CENTEC_RPC)_CONTAINER_NAME = syncd $(DOCKER_SYNCD_CENTEC_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_CENTEC_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/centec-arm64/docker-syncd-centec.mk b/platform/centec-arm64/docker-syncd-centec.mk index e9db642b026e..5e9102912871 100755 --- a/platform/centec-arm64/docker-syncd-centec.mk +++ b/platform/centec-arm64/docker-syncd-centec.mk @@ -14,6 +14,7 @@ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) $(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BASE)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_CENTEC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/centec-arm64/docker-syncd-centec/Dockerfile.j2 b/platform/centec-arm64/docker-syncd-centec/Dockerfile.j2 index 7590d65600b7..95ae5ddeccb9 100755 --- a/platform/centec-arm64/docker-syncd-centec/Dockerfile.j2 +++ b/platform/centec-arm64/docker-syncd-centec/Dockerfile.j2 @@ -1,6 +1,8 @@ FROM docker-config-engine-stretch ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -34,4 +36,6 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/centec-arm64/docker-syncd-centec/manifest.json.j2 b/platform/centec-arm64/docker-syncd-centec/manifest.json.j2 new file mode 120000 index 000000000000..affca28ad9a9 --- /dev/null +++ b/platform/centec-arm64/docker-syncd-centec/manifest.json.j2 @@ -0,0 +1 @@ +../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/centec/docker-syncd-centec-rpc.mk b/platform/centec/docker-syncd-centec-rpc.mk index b5b98e7bee4e..2f14024d8c10 100644 --- a/platform/centec/docker-syncd-centec-rpc.mk +++ b/platform/centec/docker-syncd-centec-rpc.mk @@ -19,6 +19,7 @@ endif $(DOCKER_SYNCD_CENTEC_RPC)_CONTAINER_NAME = syncd $(DOCKER_SYNCD_CENTEC_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_CENTEC_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd diff --git a/platform/centec/docker-syncd-centec.mk b/platform/centec/docker-syncd-centec.mk index d5d819f2235a..b8c46a3033f0 100644 --- a/platform/centec/docker-syncd-centec.mk +++ b/platform/centec/docker-syncd-centec.mk @@ -14,6 +14,7 @@ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) $(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BASE)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_CENTEC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/centec/docker-syncd-centec/Dockerfile.j2 b/platform/centec/docker-syncd-centec/Dockerfile.j2 index 8bb5041b15ba..a391fa3f5d47 100755 --- a/platform/centec/docker-syncd-centec/Dockerfile.j2 +++ b/platform/centec/docker-syncd-centec/Dockerfile.j2 @@ -1,6 +1,8 @@ FROM docker-config-engine-stretch ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -30,4 +32,6 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/centec/docker-syncd-centec/manifest.json.j2 b/platform/centec/docker-syncd-centec/manifest.json.j2 new file mode 120000 index 000000000000..affca28ad9a9 --- /dev/null +++ b/platform/centec/docker-syncd-centec/manifest.json.j2 @@ -0,0 +1 @@ +../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/innovium/docker-syncd-invm-rpc.mk b/platform/innovium/docker-syncd-invm-rpc.mk index de4cce280c70..65e1febf99a2 100755 --- a/platform/innovium/docker-syncd-invm-rpc.mk +++ b/platform/innovium/docker-syncd-invm-rpc.mk @@ -11,6 +11,7 @@ endif $(DOCKER_SYNCD_INVM_RPC)_CONTAINER_NAME = syncd $(DOCKER_SYNCD_INVM_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_INVM_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_INVM_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_INVM_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_INVM_RPC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd diff --git a/platform/innovium/docker-syncd-invm.mk b/platform/innovium/docker-syncd-invm.mk index 75d0a1d4933b..f500515c56e3 100755 --- a/platform/innovium/docker-syncd-invm.mk +++ b/platform/innovium/docker-syncd-invm.mk @@ -14,5 +14,6 @@ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) $(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BASE)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/platform/innovium/docker-syncd-invm/Dockerfile.j2 b/platform/innovium/docker-syncd-invm/Dockerfile.j2 index ab4be823de66..3f1a82f28204 100755 --- a/platform/innovium/docker-syncd-invm/Dockerfile.j2 +++ b/platform/innovium/docker-syncd-invm/Dockerfile.j2 @@ -1,6 +1,8 @@ FROM docker-config-engine-stretch ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -30,4 +32,6 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/innovium/docker-syncd-invm/manifest.json.j2 b/platform/innovium/docker-syncd-invm/manifest.json.j2 new file mode 120000 index 000000000000..affca28ad9a9 --- /dev/null +++ b/platform/innovium/docker-syncd-invm/manifest.json.j2 @@ -0,0 +1 @@ +../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk b/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk index 4d5b445cfbf7..c63c59006e93 100644 --- a/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk +++ b/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk @@ -19,6 +19,7 @@ endif $(DOCKER_SYNCD_MRVL_RPC)_CONTAINER_NAME = syncd $(DOCKER_SYNCD_MRVL_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_MRVL_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/marvell-arm64/docker-syncd-mrvl.mk b/platform/marvell-arm64/docker-syncd-mrvl.mk index 2b8fc7f9d2ca..f35ce7fa36b5 100644 --- a/platform/marvell-arm64/docker-syncd-mrvl.mk +++ b/platform/marvell-arm64/docker-syncd-mrvl.mk @@ -14,6 +14,7 @@ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) $(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BASE)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2 b/platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2 index afaac3fd056c..a7b68a729a2a 100755 --- a/platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2 +++ b/platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2 @@ -1,6 +1,8 @@ FROM docker-config-engine-stretch ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -34,4 +36,6 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/marvell-arm64/docker-syncd-mrvl/manifest.json.j2 b/platform/marvell-arm64/docker-syncd-mrvl/manifest.json.j2 new file mode 120000 index 000000000000..affca28ad9a9 --- /dev/null +++ b/platform/marvell-arm64/docker-syncd-mrvl/manifest.json.j2 @@ -0,0 +1 @@ +../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk b/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk index 4d5b445cfbf7..c63c59006e93 100644 --- a/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk +++ b/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk @@ -19,6 +19,7 @@ endif $(DOCKER_SYNCD_MRVL_RPC)_CONTAINER_NAME = syncd $(DOCKER_SYNCD_MRVL_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_MRVL_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/marvell-armhf/docker-syncd-mrvl.mk b/platform/marvell-armhf/docker-syncd-mrvl.mk index 2b8fc7f9d2ca..f35ce7fa36b5 100644 --- a/platform/marvell-armhf/docker-syncd-mrvl.mk +++ b/platform/marvell-armhf/docker-syncd-mrvl.mk @@ -14,6 +14,7 @@ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) $(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BASE)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 b/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 index afaac3fd056c..a7b68a729a2a 100755 --- a/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 +++ b/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 @@ -1,6 +1,8 @@ FROM docker-config-engine-stretch ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -34,4 +36,6 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/marvell-armhf/docker-syncd-mrvl/manifest.json.j2 b/platform/marvell-armhf/docker-syncd-mrvl/manifest.json.j2 new file mode 120000 index 000000000000..affca28ad9a9 --- /dev/null +++ b/platform/marvell-armhf/docker-syncd-mrvl/manifest.json.j2 @@ -0,0 +1 @@ +../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/marvell/docker-syncd-mrvl-rpc.mk b/platform/marvell/docker-syncd-mrvl-rpc.mk index 4d5b445cfbf7..c63c59006e93 100644 --- a/platform/marvell/docker-syncd-mrvl-rpc.mk +++ b/platform/marvell/docker-syncd-mrvl-rpc.mk @@ -19,6 +19,7 @@ endif $(DOCKER_SYNCD_MRVL_RPC)_CONTAINER_NAME = syncd $(DOCKER_SYNCD_MRVL_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_MRVL_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/marvell/docker-syncd-mrvl.mk b/platform/marvell/docker-syncd-mrvl.mk index 4cac777bf9e5..d7617aac186e 100644 --- a/platform/marvell/docker-syncd-mrvl.mk +++ b/platform/marvell/docker-syncd-mrvl.mk @@ -14,6 +14,7 @@ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) $(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BASE)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd diff --git a/platform/marvell/docker-syncd-mrvl/Dockerfile.j2 b/platform/marvell/docker-syncd-mrvl/Dockerfile.j2 index e91231e49791..f75d47070ce6 100755 --- a/platform/marvell/docker-syncd-mrvl/Dockerfile.j2 +++ b/platform/marvell/docker-syncd-mrvl/Dockerfile.j2 @@ -1,6 +1,8 @@ FROM docker-config-engine-stretch ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -30,4 +32,6 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/marvell/docker-syncd-mrvl/manifest.json.j2 b/platform/marvell/docker-syncd-mrvl/manifest.json.j2 new file mode 120000 index 000000000000..affca28ad9a9 --- /dev/null +++ b/platform/marvell/docker-syncd-mrvl/manifest.json.j2 @@ -0,0 +1 @@ +../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/mellanox/docker-syncd-mlnx-rpc.mk b/platform/mellanox/docker-syncd-mlnx-rpc.mk index dcdc79d36b59..52085e06f750 100644 --- a/platform/mellanox/docker-syncd-mlnx-rpc.mk +++ b/platform/mellanox/docker-syncd-mlnx-rpc.mk @@ -21,6 +21,7 @@ endif $(DOCKER_SYNCD_MLNX_RPC)_CONTAINER_NAME = syncd $(DOCKER_SYNCD_MLNX_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_MLNX_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro diff --git a/platform/mellanox/docker-syncd-mlnx.mk b/platform/mellanox/docker-syncd-mlnx.mk index c98cbebc01f2..6e6a17c7770a 100644 --- a/platform/mellanox/docker-syncd-mlnx.mk +++ b/platform/mellanox/docker-syncd-mlnx.mk @@ -15,6 +15,7 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(MLNX_SDK_DBG_DEBS) $(MLNX_SAI_DBGSYM) endif $(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BASE)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += monit_syncd:/etc/monit/conf.d diff --git a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 index 5c9ac6c1c145..6ae3c5b7098a 100755 --- a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 @@ -2,6 +2,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf RUN mkdir -p /var/run/sx_sdk @@ -39,4 +41,6 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor/"] +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/mellanox/docker-syncd-mlnx/manifest.json.j2 b/platform/mellanox/docker-syncd-mlnx/manifest.json.j2 new file mode 120000 index 000000000000..affca28ad9a9 --- /dev/null +++ b/platform/mellanox/docker-syncd-mlnx/manifest.json.j2 @@ -0,0 +1 @@ +../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/nephos/docker-syncd-nephos-rpc.mk b/platform/nephos/docker-syncd-nephos-rpc.mk index 8d3eeb55b01c..edc4ffe56076 100644 --- a/platform/nephos/docker-syncd-nephos-rpc.mk +++ b/platform/nephos/docker-syncd-nephos-rpc.mk @@ -19,6 +19,7 @@ endif $(DOCKER_SYNCD_NEPHOS_RPC)_CONTAINER_NAME = syncd $(DOCKER_SYNCD_NEPHOS_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_NEPHOS_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf $(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/platform/nephos/docker-syncd-nephos.mk b/platform/nephos/docker-syncd-nephos.mk index f61320cdfaca..7076a3803c7c 100644 --- a/platform/nephos/docker-syncd-nephos.mk +++ b/platform/nephos/docker-syncd-nephos.mk @@ -15,6 +15,7 @@ SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_BASE) SONIC_STRETCH_DBG_DOCKERS += $(DOCKER_SYNCD_BASE_DBG) $(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BASE)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd diff --git a/platform/nephos/docker-syncd-nephos/Dockerfile.j2 b/platform/nephos/docker-syncd-nephos/Dockerfile.j2 index e142fa04d57d..723f16dfe1b1 100755 --- a/platform/nephos/docker-syncd-nephos/Dockerfile.j2 +++ b/platform/nephos/docker-syncd-nephos/Dockerfile.j2 @@ -1,6 +1,8 @@ FROM docker-config-engine-stretch ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -43,4 +45,6 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/nephos/docker-syncd-nephos/manifest.json.j2 b/platform/nephos/docker-syncd-nephos/manifest.json.j2 new file mode 120000 index 000000000000..affca28ad9a9 --- /dev/null +++ b/platform/nephos/docker-syncd-nephos/manifest.json.j2 @@ -0,0 +1 @@ +../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/template/manifest.json.j2 b/platform/template/manifest.json.j2 new file mode 100644 index 000000000000..8ac948b3b152 --- /dev/null +++ b/platform/template/manifest.json.j2 @@ -0,0 +1,13 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": ["database^1.0.0"] + }, + "service": { + "name": "{{ name }}", + "asic-service": true, + "host-service": false + } +} diff --git a/platform/vs/docker-gbsyncd-vs.mk b/platform/vs/docker-gbsyncd-vs.mk index b19fad685009..50bb8e86b41a 100644 --- a/platform/vs/docker-gbsyncd-vs.mk +++ b/platform/vs/docker-gbsyncd-vs.mk @@ -12,4 +12,6 @@ $(DOCKER_GBSYNCD_BASE)_DBG_DEPENDS += $(SYNCD_VS_DBG) \ $(LIBSAIVS_DBG) $(DOCKER_GBSYNCD_BASE)_VERSION = 1.0.0 +$(DOCKER_GBSYNCD_BASE)_PACKAGE_NAME = gbsyncd + $(DOCKER_GBSYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/platform/vs/docker-gbsyncd-vs/Dockerfile.j2 b/platform/vs/docker-gbsyncd-vs/Dockerfile.j2 index d740dca663cb..9286449cfc7f 100644 --- a/platform/vs/docker-gbsyncd-vs/Dockerfile.j2 +++ b/platform/vs/docker-gbsyncd-vs/Dockerfile.j2 @@ -1,6 +1,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -31,4 +33,6 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/vs/docker-gbsyncd-vs/manifest.json.j2 b/platform/vs/docker-gbsyncd-vs/manifest.json.j2 new file mode 120000 index 000000000000..affca28ad9a9 --- /dev/null +++ b/platform/vs/docker-gbsyncd-vs/manifest.json.j2 @@ -0,0 +1 @@ +../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/vs/docker-syncd-vs.mk b/platform/vs/docker-syncd-vs.mk index 3dd112ad4e91..d2f7872ea446 100644 --- a/platform/vs/docker-syncd-vs.mk +++ b/platform/vs/docker-syncd-vs.mk @@ -12,5 +12,6 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_VS_DBG) \ $(LIBSAIVS_DBG) $(DOCKER_SYNCD_BASE)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BASE)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot diff --git a/platform/vs/docker-syncd-vs/Dockerfile.j2 b/platform/vs/docker-syncd-vs/Dockerfile.j2 index 1ef1245e14fb..1907015d42f6 100644 --- a/platform/vs/docker-syncd-vs/Dockerfile.j2 +++ b/platform/vs/docker-syncd-vs/Dockerfile.j2 @@ -1,6 +1,8 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest + RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -31,4 +33,6 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs +LABEL com.azure.sonic.manifest="$manifest" + ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/vs/docker-syncd-vs/manifest.json.j2 b/platform/vs/docker-syncd-vs/manifest.json.j2 new file mode 120000 index 000000000000..affca28ad9a9 --- /dev/null +++ b/platform/vs/docker-syncd-vs/manifest.json.j2 @@ -0,0 +1 @@ +../../template/manifest.json.j2 \ No newline at end of file diff --git a/rules/docker-database.mk b/rules/docker-database.mk index ab2ce3582662..1f903788020c 100644 --- a/rules/docker-database.mk +++ b/rules/docker-database.mk @@ -13,6 +13,7 @@ $(DOCKER_DATABASE)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMA $(DOCKER_DATABASE)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_DATABASE)_VERSION = 1.0.0 +$(DOCKER_DATABASE)_PACKAGE_NAME = database SONIC_DOCKER_IMAGES += $(DOCKER_DATABASE) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_DATABASE) diff --git a/rules/docker-dhcp-relay.mk b/rules/docker-dhcp-relay.mk index 0412d2550247..ecbf9d38ded1 100644 --- a/rules/docker-dhcp-relay.mk +++ b/rules/docker-dhcp-relay.mk @@ -15,6 +15,7 @@ $(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_I $(DOCKER_DHCP_RELAY)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_DHCP_RELAY)_VERSION = 1.0.0 +$(DOCKER_DHCP_RELAY)_PACKAGE_NAME = dhcp-relay SONIC_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_DHCP_RELAY) diff --git a/rules/docker-fpm-frr.mk b/rules/docker-fpm-frr.mk index 07516ef0a1e5..6405b8aac03e 100644 --- a/rules/docker-fpm-frr.mk +++ b/rules/docker-fpm-frr.mk @@ -17,6 +17,7 @@ $(DOCKER_FPM_FRR)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAG $(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_FPM_FRR)_VERSION = 1.0.0 +$(DOCKER_FPM_FRR)_PACKAGE_NAME = fpm-frr SONIC_DOCKER_IMAGES += $(DOCKER_FPM_FRR) diff --git a/rules/docker-fpm-gobgp.mk b/rules/docker-fpm-gobgp.mk index 8a285f3a6dc9..a773651ae14f 100644 --- a/rules/docker-fpm-gobgp.mk +++ b/rules/docker-fpm-gobgp.mk @@ -6,6 +6,7 @@ $(DOCKER_FPM_GOBGP)_DEPENDS += $(GOBGP) $(DOCKER_FPM_GOBGP)_LOAD_DOCKERS += $(DOCKER_FPM_QUAGGA) $(DOCKER_FPM_GOBGP)_VERSION = 1.0.0 +$(DOCKER_FPM_GOBGP)_PACKAGE_NAME = fpm-gobgp SONIC_DOCKER_IMAGES += $(DOCKER_FPM_GOBGP) diff --git a/rules/docker-fpm-quagga.mk b/rules/docker-fpm-quagga.mk index ec77e7c32928..658ac8f3fef7 100644 --- a/rules/docker-fpm-quagga.mk +++ b/rules/docker-fpm-quagga.mk @@ -6,6 +6,7 @@ $(DOCKER_FPM_QUAGGA)_DEPENDS += $(QUAGGA) $(SWSS) $(DOCKER_FPM_QUAGGA)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE) $(DOCKER_FPM_QUAGGA)_VERSION = 1.0.0 +$(DOCKER_FPM_QUAGGA)_PACKAGE_NAME = fpm-quagga SONIC_DOCKER_IMAGES += $(DOCKER_FPM_QUAGGA) diff --git a/rules/docker-iccpd.mk b/rules/docker-iccpd.mk index aa29bdc3050e..69b9fee50eef 100644 --- a/rules/docker-iccpd.mk +++ b/rules/docker-iccpd.mk @@ -11,6 +11,7 @@ $(DOCKER_ICCPD)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_ $(DOCKER_ICCPD)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_ICCPD)_VERSION = 1.0.0 +$(DOCKER_ICCPD)_ICCPD = iccpd ifeq ($(INCLUDE_ICCPD), y) SONIC_DOCKER_IMAGES += $(DOCKER_ICCPD) diff --git a/rules/docker-lldp.mk b/rules/docker-lldp.mk index 2ccf375e25cd..0ee4943175f0 100644 --- a/rules/docker-lldp.mk +++ b/rules/docker-lldp.mk @@ -17,6 +17,7 @@ $(DOCKER_LLDP)_PYTHON_WHEELS += $(DBSYNCD_PY2) $(DOCKER_LLDP)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_LLDP)_VERSION = 1.0.0 +$(DOCKER_LLDP)_PACKAGE_NAME = lldp SONIC_DOCKER_IMAGES += $(DOCKER_LLDP) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_LLDP) diff --git a/rules/docker-nat.mk b/rules/docker-nat.mk index e84174088f0b..6c958bb8ecfa 100644 --- a/rules/docker-nat.mk +++ b/rules/docker-nat.mk @@ -14,6 +14,7 @@ $(DOCKER_NAT)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PA $(DOCKER_NAT)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_NAT)_VERSION = 1.0.0 +$(DOCKER_NAT)_PACKAGE_NAME = nat ifeq ($(INCLUDE_NAT), y) SONIC_DOCKER_IMAGES += $(DOCKER_NAT) diff --git a/rules/docker-orchagent.mk b/rules/docker-orchagent.mk index 91e9ea1623a0..ff54642d8ffe 100644 --- a/rules/docker-orchagent.mk +++ b/rules/docker-orchagent.mk @@ -18,6 +18,7 @@ $(DOCKER_ORCHAGENT)_PATH = $(DOCKERS_PATH)/$(DOCKER_ORCHAGENT_STEM) $(DOCKER_ORCHAGENT)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_ORCHAGENT)_VERSION = 1.0.0 +$(DOCKER_ORCHAGENT)_PACKAGE_NAME = swss SONIC_DOCKER_IMAGES += $(DOCKER_ORCHAGENT) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ORCHAGENT) diff --git a/rules/docker-platform-monitor.mk b/rules/docker-platform-monitor.mk index 1307d0dee62b..57b20e014c07 100644 --- a/rules/docker-platform-monitor.mk +++ b/rules/docker-platform-monitor.mk @@ -36,6 +36,7 @@ $(DOCKER_PLATFORM_MONITOR)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_PLATFORM_MONITOR)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_PLATFORM_MONITOR)_VERSION = 1.0.0 +$(DOCKER_PLATFORM_MONITOR)_PACKAGE_NAME = pmon SONIC_DOCKER_IMAGES += $(DOCKER_PLATFORM_MONITOR) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_PLATFORM_MONITOR) diff --git a/rules/docker-restapi.mk b/rules/docker-restapi.mk index d9d6bb34a311..2bdc1a6a9940 100644 --- a/rules/docker-restapi.mk +++ b/rules/docker-restapi.mk @@ -11,6 +11,7 @@ $(DOCKER_RESTAPI)_PATH = $(DOCKERS_PATH)/$(DOCKER_RESTAPI_STEM) $(DOCKER_RESTAPI)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH) $(DOCKER_RESTAPI)_VERSION = 1.0.0 +$(DOCKER_RESTAPI)_PACKAGE_NAME = restapi ifeq ($(INCLUDE_RESTAPI), y) SONIC_DOCKER_IMAGES += $(DOCKER_RESTAPI) diff --git a/rules/docker-router-advertiser.mk b/rules/docker-router-advertiser.mk index adc06f4ea5f5..eb3e3268f27b 100644 --- a/rules/docker-router-advertiser.mk +++ b/rules/docker-router-advertiser.mk @@ -14,6 +14,7 @@ $(DOCKER_ROUTER_ADVERTISER)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER $(DOCKER_ROUTER_ADVERTISER)_LOAD_DOCKERS = $(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_ROUTER_ADVERTISER)_VERSION = 1.0.0 +$(DOCKER_ROUTER_ADVERTISER)_PACKAGE_NAME = radv SONIC_DOCKER_IMAGES += $(DOCKER_ROUTER_ADVERTISER) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_ROUTER_ADVERTISER) diff --git a/rules/docker-sflow.mk b/rules/docker-sflow.mk index 9a909e2d4723..959afed883e5 100644 --- a/rules/docker-sflow.mk +++ b/rules/docker-sflow.mk @@ -14,6 +14,7 @@ $(DOCKER_SFLOW)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_ $(DOCKER_SFLOW)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_SFLOW)_VERSION = 1.0.0 +$(DOCKER_SFLOW)_PACKAGE_NAME = sflow SONIC_DOCKER_IMAGES += $(DOCKER_SFLOW) ifeq ($(INCLUDE_SFLOW), y) diff --git a/rules/docker-snmp.mk b/rules/docker-snmp.mk index 7241f688faf9..c433e2079a3f 100644 --- a/rules/docker-snmp.mk +++ b/rules/docker-snmp.mk @@ -18,6 +18,7 @@ $(DOCKER_SNMP)_PYTHON_WHEELS += $(SONIC_PY_COMMON_PY3) $(SONIC_PLATFORM_COMMON_P $(DOCKER_SNMP)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_SNMP)_VERSION = 1.0.0 +$(DOCKER_SNMP)_PACKAGE_NAME = snmp SONIC_DOCKER_IMAGES += $(DOCKER_SNMP) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SNMP) diff --git a/rules/docker-sonic-mgmt-framework.mk b/rules/docker-sonic-mgmt-framework.mk index d0137ee034fb..ef1d55990816 100644 --- a/rules/docker-sonic-mgmt-framework.mk +++ b/rules/docker-sonic-mgmt-framework.mk @@ -15,6 +15,7 @@ SONIC_DOCKER_IMAGES += $(DOCKER_MGMT_FRAMEWORK) $(DOCKER_MGMT_FRAMEWORK)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_MGMT_FRAMEWORK)_VERSION = 1.0.0 +$(DOCKER_MGMT_FRAMEWORK)_PACKAGE_NAME = mgmt-framework $(DOCKER_MGMT_FRAMEWORK)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) diff --git a/rules/docker-teamd.mk b/rules/docker-teamd.mk index 63c12196d5d6..088860fb5d68 100644 --- a/rules/docker-teamd.mk +++ b/rules/docker-teamd.mk @@ -16,6 +16,7 @@ $(DOCKER_TEAMD)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_ $(DOCKER_TEAMD)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_TEAMD)_VERSION = 1.0.0 +$(DOCKER_TEAMD)_PACKAGE_NAME = teamd SONIC_DOCKER_IMAGES += $(DOCKER_TEAMD) SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_TEAMD) diff --git a/rules/docker-telemetry.mk b/rules/docker-telemetry.mk index dcd02a665722..097df1f7b7db 100644 --- a/rules/docker-telemetry.mk +++ b/rules/docker-telemetry.mk @@ -13,6 +13,7 @@ $(DOCKER_TELEMETRY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) $(DOCKER_TELEMETRY)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_BUSTER) $(DOCKER_TELEMETRY)_VERSION = 1.0.0 +$(DOCKER_TELEMETRY)_PACKAGE_NAME = telemetry $(DOCKER_TELEMETRY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) diff --git a/slave.mk b/slave.mk index 173e2716f8c2..a71b6a42a07b 100644 --- a/slave.mk +++ b/slave.mk @@ -729,6 +729,12 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform --build-arg docker_container_name=$($*.gz_CONTAINER_NAME) \ --build-arg frr_user_uid=$(FRR_USER_UID) \ --build-arg frr_user_gid=$(FRR_USER_GID) \ + --build-arg \ + manifest='$(shell \ + [ -f $($*.gz_PATH)/manifest.json.j2 ] && \ + version=$($*.gz_VERSION) \ + name=$($*.gz_CONTAINER_NAME) \ + j2 $($*.gz_PATH)/manifest.json.j2)' \ --label Tag=$(SONIC_IMAGE_VERSION) \ -t $* $($*.gz_PATH) $(LOG) docker save $* | gzip -c > $@ @@ -868,7 +874,10 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ export enable_pfcwd_on_start="$(ENABLE_PFCWD_ON_START)" export installer_debs="$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$($*_INSTALLS))" export lazy_installer_debs="$(foreach deb, $($*_LAZY_INSTALLS),$(foreach device, $($(deb)_PLATFORM),$(addprefix $(device)@, $(IMAGE_DISTRO_DEBS_PATH)/$(deb))))" - export installer_images="$(foreach docker, $($*_DOCKERS),$(addprefix $(TARGET_PATH)/,$(addsuffix :$($(docker)_VERSION),$(docker))))" + export installer_images="$(foreach docker, $($*_DOCKERS),\ + $(addprefix $($(docker)_PACKAGE_NAME)|,\ + $(addprefix $($(docker)_PATH)|,\ + $(addprefix $(TARGET_PATH)/,$(addsuffix :$($(docker)_VERSION),$(docker))))))" export sonic_py_common_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PY_COMMON_PY2))" export sonic_py_common_py3_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PY_COMMON_PY3))" export config_engine_py2_wheel_path="$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE_PY2))" From 855fa603b10542332e5fccfa695681e3b03f218b Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak Date: Mon, 16 Nov 2020 12:33:32 +0200 Subject: [PATCH 04/21] [dockers] add package name to manifest Signed-off-by: Stepan Blyshchak --- dockers/docker-database/manifest.json.j2 | 3 ++- dockers/docker-dhcp-relay/manifest.json.j2 | 6 +++++- dockers/docker-fpm-frr/manifest.json.j2 | 11 +++++++++-- dockers/docker-fpm-gobgp/manifest.json.j2 | 11 +++++++++-- dockers/docker-fpm-quagga/manifest.json.j2 | 11 +++++++++-- dockers/docker-iccpd/manifest.json.j2 | 6 +++++- dockers/docker-lldp/manifest.json.j2 | 6 +++++- dockers/docker-nat/manifest.json.j2 | 6 +++++- dockers/docker-orchagent/manifest.json.j2 | 6 +++++- dockers/docker-platform-monitor/manifest.json.j2 | 5 ++++- dockers/docker-router-advertiser/manifest.json.j2 | 6 +++++- dockers/docker-sflow/manifest.json.j2 | 6 +++++- dockers/docker-snmp/manifest.json.j2 | 6 +++++- dockers/docker-sonic-mgmt-framework/manifest.json.j2 | 6 +++++- dockers/docker-sonic-restapi/manifest.json.j2 | 6 +++++- dockers/docker-sonic-telemetry/manifest.json.j2 | 6 +++++- dockers/docker-teamd/manifest.json.j2 | 6 +++++- platform/template/manifest.json.j2 | 5 ++++- slave.mk | 1 + 19 files changed, 98 insertions(+), 21 deletions(-) diff --git a/dockers/docker-database/manifest.json.j2 b/dockers/docker-database/manifest.json.j2 index 07d43898ff12..c08f7acfb849 100644 --- a/dockers/docker-database/manifest.json.j2 +++ b/dockers/docker-database/manifest.json.j2 @@ -2,7 +2,8 @@ "version": "1.0.0", "package": { "version": "{{ version }}", - "base-os-contraint": "^1.0.0" + "base-os-contraint": "^1.0.0", + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-dhcp-relay/manifest.json.j2 b/dockers/docker-dhcp-relay/manifest.json.j2 index a76b30f9f0ab..bbce95399868 100644 --- a/dockers/docker-dhcp-relay/manifest.json.j2 +++ b/dockers/docker-dhcp-relay/manifest.json.j2 @@ -3,7 +3,11 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0", "swss^1.0.0"] + "depends": [ + "database^1.0.0", + "swss^1.0.0" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-fpm-frr/manifest.json.j2 b/dockers/docker-fpm-frr/manifest.json.j2 index 1daeb738c784..dfc63fca1a6d 100644 --- a/dockers/docker-fpm-frr/manifest.json.j2 +++ b/dockers/docker-fpm-frr/manifest.json.j2 @@ -3,8 +3,15 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0", "swss^1.0.0"], - "conflicts": ["fpm-gobgp", "fpm-quagga"] + "depends": [ + "database^1.0.0", + "swss^1.0.0" + ], + "conflicts": [ + "fpm-gobgp", + "fpm-quagga" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-fpm-gobgp/manifest.json.j2 b/dockers/docker-fpm-gobgp/manifest.json.j2 index 9b8a5a11870f..982772f1aafa 100644 --- a/dockers/docker-fpm-gobgp/manifest.json.j2 +++ b/dockers/docker-fpm-gobgp/manifest.json.j2 @@ -3,8 +3,15 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0", "swss^1.0.0"], - "conflicts": ["fpm-frr", "fpm-quagga"] + "depends": [ + "database^1.0.0", + "swss^1.0.0" + ], + "conflicts": [ + "fpm-frr", + "fpm-quagga" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-fpm-quagga/manifest.json.j2 b/dockers/docker-fpm-quagga/manifest.json.j2 index cd5734259e46..1f2daf816ea6 100644 --- a/dockers/docker-fpm-quagga/manifest.json.j2 +++ b/dockers/docker-fpm-quagga/manifest.json.j2 @@ -3,8 +3,15 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0", "swss^1.0.0"], - "conflicts": ["fpm-gobgp", "fpm-frr"] + "depends": [ + "database^1.0.0", + "swss^1.0.0" + ], + "conflicts": [ + "fpm-gobgp", + "fpm-frr" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-iccpd/manifest.json.j2 b/dockers/docker-iccpd/manifest.json.j2 index a76b30f9f0ab..bbce95399868 100644 --- a/dockers/docker-iccpd/manifest.json.j2 +++ b/dockers/docker-iccpd/manifest.json.j2 @@ -3,7 +3,11 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0", "swss^1.0.0"] + "depends": [ + "database^1.0.0", + "swss^1.0.0" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-lldp/manifest.json.j2 b/dockers/docker-lldp/manifest.json.j2 index d86a71f9f781..d1edab0d4d98 100644 --- a/dockers/docker-lldp/manifest.json.j2 +++ b/dockers/docker-lldp/manifest.json.j2 @@ -3,7 +3,11 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0", "swss^1.0.0"] + "depends": [ + "database^1.0.0", + "swss^1.0.0" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-nat/manifest.json.j2 b/dockers/docker-nat/manifest.json.j2 index a76b30f9f0ab..bbce95399868 100644 --- a/dockers/docker-nat/manifest.json.j2 +++ b/dockers/docker-nat/manifest.json.j2 @@ -3,7 +3,11 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0", "swss^1.0.0"] + "depends": [ + "database^1.0.0", + "swss^1.0.0" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-orchagent/manifest.json.j2 b/dockers/docker-orchagent/manifest.json.j2 index 6f81022833a3..ac3d07d87564 100644 --- a/dockers/docker-orchagent/manifest.json.j2 +++ b/dockers/docker-orchagent/manifest.json.j2 @@ -3,7 +3,11 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0", "syncd^1.0.0"] + "depends": [ + "database^1.0.0", + "syncd^1.0.0" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-platform-monitor/manifest.json.j2 b/dockers/docker-platform-monitor/manifest.json.j2 index 82f296666838..11e5a832d39c 100644 --- a/dockers/docker-platform-monitor/manifest.json.j2 +++ b/dockers/docker-platform-monitor/manifest.json.j2 @@ -3,7 +3,10 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0"] + "depends": [ + "database^1.0.0" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-router-advertiser/manifest.json.j2 b/dockers/docker-router-advertiser/manifest.json.j2 index a76b30f9f0ab..bbce95399868 100644 --- a/dockers/docker-router-advertiser/manifest.json.j2 +++ b/dockers/docker-router-advertiser/manifest.json.j2 @@ -3,7 +3,11 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0", "swss^1.0.0"] + "depends": [ + "database^1.0.0", + "swss^1.0.0" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-sflow/manifest.json.j2 b/dockers/docker-sflow/manifest.json.j2 index a76b30f9f0ab..bbce95399868 100644 --- a/dockers/docker-sflow/manifest.json.j2 +++ b/dockers/docker-sflow/manifest.json.j2 @@ -3,7 +3,11 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0", "swss^1.0.0"] + "depends": [ + "database^1.0.0", + "swss^1.0.0" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-snmp/manifest.json.j2 b/dockers/docker-snmp/manifest.json.j2 index a76b30f9f0ab..bbce95399868 100644 --- a/dockers/docker-snmp/manifest.json.j2 +++ b/dockers/docker-snmp/manifest.json.j2 @@ -3,7 +3,11 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0", "swss^1.0.0"] + "depends": [ + "database^1.0.0", + "swss^1.0.0" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-sonic-mgmt-framework/manifest.json.j2 b/dockers/docker-sonic-mgmt-framework/manifest.json.j2 index a76b30f9f0ab..bbce95399868 100644 --- a/dockers/docker-sonic-mgmt-framework/manifest.json.j2 +++ b/dockers/docker-sonic-mgmt-framework/manifest.json.j2 @@ -3,7 +3,11 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0", "swss^1.0.0"] + "depends": [ + "database^1.0.0", + "swss^1.0.0" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-sonic-restapi/manifest.json.j2 b/dockers/docker-sonic-restapi/manifest.json.j2 index a76b30f9f0ab..bbce95399868 100644 --- a/dockers/docker-sonic-restapi/manifest.json.j2 +++ b/dockers/docker-sonic-restapi/manifest.json.j2 @@ -3,7 +3,11 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0", "swss^1.0.0"] + "depends": [ + "database^1.0.0", + "swss^1.0.0" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-sonic-telemetry/manifest.json.j2 b/dockers/docker-sonic-telemetry/manifest.json.j2 index a76b30f9f0ab..bbce95399868 100644 --- a/dockers/docker-sonic-telemetry/manifest.json.j2 +++ b/dockers/docker-sonic-telemetry/manifest.json.j2 @@ -3,7 +3,11 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0", "swss^1.0.0"] + "depends": [ + "database^1.0.0", + "swss^1.0.0" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/dockers/docker-teamd/manifest.json.j2 b/dockers/docker-teamd/manifest.json.j2 index 4766bbde8b26..e21b557a079d 100644 --- a/dockers/docker-teamd/manifest.json.j2 +++ b/dockers/docker-teamd/manifest.json.j2 @@ -3,7 +3,11 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0", "swss^1.0.0"] + "depends": [ + "database^1.0.0", + "swss^1.0.0" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/platform/template/manifest.json.j2 b/platform/template/manifest.json.j2 index 8ac948b3b152..7c2528a3bb43 100644 --- a/platform/template/manifest.json.j2 +++ b/platform/template/manifest.json.j2 @@ -3,7 +3,10 @@ "package": { "version": "{{ version }}", "base-os-contraint": "^1.0.0", - "depends": ["database^1.0.0"] + "depends": [ + "database^1.0.0" + ], + "name": "{{ package_name }}" }, "service": { "name": "{{ name }}", diff --git a/slave.mk b/slave.mk index a71b6a42a07b..12dd3bf7b6bd 100644 --- a/slave.mk +++ b/slave.mk @@ -734,6 +734,7 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform [ -f $($*.gz_PATH)/manifest.json.j2 ] && \ version=$($*.gz_VERSION) \ name=$($*.gz_CONTAINER_NAME) \ + package_name=$($*.gz_PACKAGE_NAME) \ j2 $($*.gz_PATH)/manifest.json.j2)' \ --label Tag=$(SONIC_IMAGE_VERSION) \ -t $* $($*.gz_PATH) $(LOG) From 44685baeaa594e3390f3e7f351d430fd459bf5e6 Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak Date: Mon, 16 Nov 2020 22:31:51 +0200 Subject: [PATCH 05/21] remove swss dependency from dhcp-relay & router-advertiser Signed-off-by: Stepan Blyshchak --- dockers/docker-dhcp-relay/manifest.json.j2 | 3 +-- dockers/docker-router-advertiser/manifest.json.j2 | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dockers/docker-dhcp-relay/manifest.json.j2 b/dockers/docker-dhcp-relay/manifest.json.j2 index bbce95399868..11e5a832d39c 100644 --- a/dockers/docker-dhcp-relay/manifest.json.j2 +++ b/dockers/docker-dhcp-relay/manifest.json.j2 @@ -4,8 +4,7 @@ "version": "{{ version }}", "base-os-contraint": "^1.0.0", "depends": [ - "database^1.0.0", - "swss^1.0.0" + "database^1.0.0" ], "name": "{{ package_name }}" }, diff --git a/dockers/docker-router-advertiser/manifest.json.j2 b/dockers/docker-router-advertiser/manifest.json.j2 index bbce95399868..11e5a832d39c 100644 --- a/dockers/docker-router-advertiser/manifest.json.j2 +++ b/dockers/docker-router-advertiser/manifest.json.j2 @@ -4,8 +4,7 @@ "version": "{{ version }}", "base-os-contraint": "^1.0.0", "depends": [ - "database^1.0.0", - "swss^1.0.0" + "database^1.0.0" ], "name": "{{ package_name }}" }, From ed1bd3f8a0100fd20f0b563d1bd50e8fdd248e4c Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak Date: Wed, 13 Jan 2021 15:23:39 +0200 Subject: [PATCH 06/21] remove sonic-sdk added by mistake in this change Signed-off-by: Stepan Blyshchak --- dockers/docker-sonic-sdk/Dockerfile.j2 | 79 -------------------------- 1 file changed, 79 deletions(-) delete mode 100644 dockers/docker-sonic-sdk/Dockerfile.j2 diff --git a/dockers/docker-sonic-sdk/Dockerfile.j2 b/dockers/docker-sonic-sdk/Dockerfile.j2 deleted file mode 100644 index b74aec7f1973..000000000000 --- a/dockers/docker-sonic-sdk/Dockerfile.j2 +++ /dev/null @@ -1,79 +0,0 @@ -{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %} -FROM docker-config-engine-buster - -## Make apt-get non-interactive -ENV DEBIAN_FRONTEND=noninteractive - -RUN apt-get update && \ - apt-get install -f -y \ - ifupdown \ - arping \ - libdbus-1-3 \ - libdaemon0 \ - libjansson4 \ - libpython2.7 \ - iproute2 \ - ndisc6 \ - tcpdump \ - libatomic1 \ - libjemalloc1 \ - liblua5.1-0 \ - lua-bitop \ - lua-cjson \ - libelf1 \ - libmnl0 \ - bridge-utils - - -## Build tools -RUN apt-get update && \ - apt-get install -f -y \ - autoconf \ - automake \ - libtool \ - curl \ - make \ - g++ \ - gcc \ - vim \ - git \ - unzip - -{% if ( CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" ) %} -## Fix for gcc/python not found in arm docker -RUN apt-get install -f -y python2.7 python2.7-dev -RUN apt-get install -y gcc-6 -{% endif %} -{% if CONFIGURED_ARCH == "armhf" %} -RUN ln -s -f /usr/bin/gcc-6 /usr/bin/arm-linux-gnueabihf-gcc -{% endif %} -{% if CONFIGURED_ARCH == "arm64" %} -RUN ln -s -f /usr/bin/gcc-6 /usr/bin/aarch64-linux-gnu-gcc -{% endif %} - -#RUN pip install \ -# scapy==2.4.2 \ -# setuptools \ -# pyroute2==0.5.3 -#RUN pip install \ -# netifaces==0.10.7 \ -# monotonic==1.5 - -{% if ( CONFIGURED_ARCH == "armhf" or CONFIGURED_ARCH == "arm64" ) %} -# Remove installed gcc -RUN apt-get remove -y gcc-6 -{% endif %} - -{% if docker_sonic_sdk_debs.strip() -%} -# Copy locally-built Debian package dependencies -{{ copy_files("debs/", docker_sonic_sdk_debs.split(' '), "/debs/") }} - -# Install locally-built Debian packages and implicitly install their dependencies -{{ install_debian_packages(docker_sonic_sdk_debs.split(' ')) }} -{%- endif %} - -## Clean up -RUN apt-get clean -y && \ - apt-get autoclean -y && \ - apt-get autoremove -y && \ - rm -rf /debs From 823eeded6925c37bf3fe1f5fee6304a85bfee685 Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak Date: Thu, 21 Jan 2021 13:09:08 +0200 Subject: [PATCH 07/21] [docker-macsec] add version number for docker-macsec Signed-off-by: Stepan Blyshchak --- rules/docker-macsec.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/rules/docker-macsec.mk b/rules/docker-macsec.mk index f9f8c9b41298..dbd5e698c4bb 100644 --- a/rules/docker-macsec.mk +++ b/rules/docker-macsec.mk @@ -24,6 +24,7 @@ SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_MACSEC_DBG) SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_MACSEC_DBG) $(DOCKER_MACSEC)_CONTAINER_NAME = macsec +$(DOCKER_MACSEC)_VERSION = 1.0.0 $(DOCKER_MACSEC)_RUN_OPT += --privileged -t $(DOCKER_MACSEC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro $(DOCKER_MACSEC)_RUN_OPT += -v /host/warmboot:/var/warmboot From 05df4edee53d6893180cba0f1fbbd2eda90b4a20 Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak Date: Thu, 21 Jan 2021 13:19:25 +0200 Subject: [PATCH 08/21] [docker-macsec] add manifest for macsec docker Signed-off-by: Stepan Blyshchak --- dockers/docker-macsec/Dockerfile.j2 | 3 +++ dockers/docker-macsec/manifest.json.j2 | 17 +++++++++++++++++ rules/docker-macsec.mk | 1 + 3 files changed, 21 insertions(+) create mode 100644 dockers/docker-macsec/manifest.json.j2 diff --git a/dockers/docker-macsec/Dockerfile.j2 b/dockers/docker-macsec/Dockerfile.j2 index bf8db48079e0..03f5bebab14d 100644 --- a/dockers/docker-macsec/Dockerfile.j2 +++ b/dockers/docker-macsec/Dockerfile.j2 @@ -2,6 +2,7 @@ FROM docker-config-engine-buster ARG docker_container_name +ARG manifest RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive @@ -27,4 +28,6 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] +LABEL com.azure.sonic.manifest="$manifest" + # ENTRYPOINT ["/usr/bin/supervisord"] diff --git a/dockers/docker-macsec/manifest.json.j2 b/dockers/docker-macsec/manifest.json.j2 new file mode 100644 index 000000000000..e21b557a079d --- /dev/null +++ b/dockers/docker-macsec/manifest.json.j2 @@ -0,0 +1,17 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^1.0.0", + "depends": [ + "database^1.0.0", + "swss^1.0.0" + ], + "name": "{{ package_name }}" + }, + "service": { + "name": "{{ name }}", + "asic-service": true, + "host-service": false + } +} diff --git a/rules/docker-macsec.mk b/rules/docker-macsec.mk index dbd5e698c4bb..0e59b491a23a 100644 --- a/rules/docker-macsec.mk +++ b/rules/docker-macsec.mk @@ -25,6 +25,7 @@ SONIC_BUSTER_DBG_DOCKERS += $(DOCKER_MACSEC_DBG) $(DOCKER_MACSEC)_CONTAINER_NAME = macsec $(DOCKER_MACSEC)_VERSION = 1.0.0 +$(DOCKER_MACSEC)_PACKAGE_NAME = macsec $(DOCKER_MACSEC)_RUN_OPT += --privileged -t $(DOCKER_MACSEC)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro $(DOCKER_MACSEC)_RUN_OPT += -v /host/warmboot:/var/warmboot From e0735d2703598831b6f5aed97d0a05f7f8e52089 Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak Date: Mon, 25 Jan 2021 18:33:40 +0200 Subject: [PATCH 09/21] [sonic_debian_extension.j2] fix merge conflict markers Signed-off-by: Stepan Blyshchak --- files/build_templates/sonic_debian_extension.j2 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index f7669ff71b7f..83f342174350 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -578,13 +578,9 @@ sudo mount proc /proc -t proc sudo mkdir $FILESYSTEM_ROOT/target sudo mount --bind target $FILESYSTEM_ROOT/target sudo chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS info -<<<<<<< HEAD {% for docker_installation_target in installer_images.strip().split() -%} {% set pkgname, docker_build_path, image = docker_installation_target.split('|') %} -======= -{% for image in installer_images.strip().split(' ') -%} ->>>>>>> 823eeded6925c37bf3fe1f5fee6304a85bfee685 {% set imagefilepath = image.split(':')|first -%} {% set imageversion = image.split(':')|last -%} {% set imagefilename = imagefilepath.split('/')|last -%} From 2066aa964fe57fd3b25357f81b07dda77c4b0c0b Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Fri, 29 Jan 2021 12:54:14 +0000 Subject: [PATCH 10/21] [dockers] use single manifest template Signed-off-by: Stepan Blyshchak --- .gitignore | 5 ++++ dockers/docker-database/manifest.json.j2 | 13 --------- dockers/docker-dhcp-relay/manifest.json.j2 | 16 ----------- dockers/docker-fpm-frr/manifest.json.j2 | 21 --------------- dockers/docker-fpm-gobgp/manifest.json.j2 | 21 --------------- dockers/docker-fpm-quagga/manifest.json.j2 | 21 --------------- dockers/docker-iccpd/manifest.json.j2 | 17 ------------ dockers/docker-lldp/manifest.json.j2 | 17 ------------ dockers/docker-macsec/manifest.json.j2 | 17 ------------ dockers/docker-nat/manifest.json.j2 | 17 ------------ dockers/docker-orchagent/manifest.json.j2 | 17 ------------ .../docker-platform-monitor/manifest.json.j2 | 16 ----------- .../docker-router-advertiser/manifest.json.j2 | 16 ----------- dockers/docker-sflow/manifest.json.j2 | 17 ------------ dockers/docker-snmp/manifest.json.j2 | 17 ------------ .../manifest.json.j2 | 17 ------------ dockers/docker-sonic-restapi/manifest.json.j2 | 17 ------------ .../docker-sonic-telemetry/manifest.json.j2 | 17 ------------ dockers/docker-teamd/manifest.json.j2 | 17 ------------ files/build_templates/manifest.json.j2 | 27 +++++++++++++++++++ .../docker-syncd-bfn/manifest.json.j2 | 1 - .../docker-syncd-brcm/manifest.json.j2 | 1 - .../cavium/docker-syncd-cavm/manifest.json.j2 | 1 - .../docker-syncd-centec/manifest.json.j2 | 1 - .../docker-syncd-centec/manifest.json.j2 | 1 - .../docker-syncd-invm/manifest.json.j2 | 1 - .../docker-syncd-mrvl/manifest.json.j2 | 1 - .../docker-syncd-mrvl/manifest.json.j2 | 1 - .../docker-syncd-mrvl/manifest.json.j2 | 1 - .../docker-syncd-mlnx/manifest.json.j2 | 1 - .../docker-syncd-nephos/manifest.json.j2 | 1 - .../vs/docker-gbsyncd-vs/manifest.json.j2 | 1 - platform/vs/docker-syncd-vs/manifest.json.j2 | 1 - scripts/j2cli/json_filter.py | 12 +++++++++ slave.mk | 25 ++++++++++++----- 35 files changed, 62 insertions(+), 331 deletions(-) delete mode 100644 dockers/docker-database/manifest.json.j2 delete mode 100644 dockers/docker-dhcp-relay/manifest.json.j2 delete mode 100644 dockers/docker-fpm-frr/manifest.json.j2 delete mode 100644 dockers/docker-fpm-gobgp/manifest.json.j2 delete mode 100644 dockers/docker-fpm-quagga/manifest.json.j2 delete mode 100644 dockers/docker-iccpd/manifest.json.j2 delete mode 100644 dockers/docker-lldp/manifest.json.j2 delete mode 100644 dockers/docker-macsec/manifest.json.j2 delete mode 100644 dockers/docker-nat/manifest.json.j2 delete mode 100644 dockers/docker-orchagent/manifest.json.j2 delete mode 100644 dockers/docker-platform-monitor/manifest.json.j2 delete mode 100644 dockers/docker-router-advertiser/manifest.json.j2 delete mode 100644 dockers/docker-sflow/manifest.json.j2 delete mode 100644 dockers/docker-snmp/manifest.json.j2 delete mode 100644 dockers/docker-sonic-mgmt-framework/manifest.json.j2 delete mode 100644 dockers/docker-sonic-restapi/manifest.json.j2 delete mode 100644 dockers/docker-sonic-telemetry/manifest.json.j2 delete mode 100644 dockers/docker-teamd/manifest.json.j2 create mode 100644 files/build_templates/manifest.json.j2 delete mode 120000 platform/barefoot/docker-syncd-bfn/manifest.json.j2 delete mode 120000 platform/broadcom/docker-syncd-brcm/manifest.json.j2 delete mode 120000 platform/cavium/docker-syncd-cavm/manifest.json.j2 delete mode 120000 platform/centec-arm64/docker-syncd-centec/manifest.json.j2 delete mode 120000 platform/centec/docker-syncd-centec/manifest.json.j2 delete mode 120000 platform/innovium/docker-syncd-invm/manifest.json.j2 delete mode 120000 platform/marvell-arm64/docker-syncd-mrvl/manifest.json.j2 delete mode 120000 platform/marvell-armhf/docker-syncd-mrvl/manifest.json.j2 delete mode 120000 platform/marvell/docker-syncd-mrvl/manifest.json.j2 delete mode 120000 platform/mellanox/docker-syncd-mlnx/manifest.json.j2 delete mode 120000 platform/nephos/docker-syncd-nephos/manifest.json.j2 delete mode 120000 platform/vs/docker-gbsyncd-vs/manifest.json.j2 delete mode 120000 platform/vs/docker-syncd-vs/manifest.json.j2 create mode 100644 scripts/j2cli/json_filter.py diff --git a/.gitignore b/.gitignore index 7e2f73f718e9..6f7da6d22f22 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ target/ *-dbg *dbg.j2 *.img +*.pyc # Autogenerated Dockerfiles sonic-slave*/Dockerfile @@ -27,6 +28,10 @@ sonic-slave*/Dockerfile.user dockers/*/Dockerfile platform/*/docker-*/Dockerfile +# Autogenerated manifest files +dockers/*/manifest.json +platform/*/docker-*/manifest.json + # Installer-related files and directories installer/x86_64/platforms/ diff --git a/dockers/docker-database/manifest.json.j2 b/dockers/docker-database/manifest.json.j2 deleted file mode 100644 index c08f7acfb849..000000000000 --- a/dockers/docker-database/manifest.json.j2 +++ /dev/null @@ -1,13 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": true, - "host-service": true - } -} diff --git a/dockers/docker-dhcp-relay/manifest.json.j2 b/dockers/docker-dhcp-relay/manifest.json.j2 deleted file mode 100644 index 11e5a832d39c..000000000000 --- a/dockers/docker-dhcp-relay/manifest.json.j2 +++ /dev/null @@ -1,16 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": false, - "host-service": true - } -} diff --git a/dockers/docker-fpm-frr/manifest.json.j2 b/dockers/docker-fpm-frr/manifest.json.j2 deleted file mode 100644 index dfc63fca1a6d..000000000000 --- a/dockers/docker-fpm-frr/manifest.json.j2 +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0", - "swss^1.0.0" - ], - "conflicts": [ - "fpm-gobgp", - "fpm-quagga" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": true, - "host-service": false - } -} diff --git a/dockers/docker-fpm-gobgp/manifest.json.j2 b/dockers/docker-fpm-gobgp/manifest.json.j2 deleted file mode 100644 index 982772f1aafa..000000000000 --- a/dockers/docker-fpm-gobgp/manifest.json.j2 +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0", - "swss^1.0.0" - ], - "conflicts": [ - "fpm-frr", - "fpm-quagga" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": true, - "host-service": false - } -} diff --git a/dockers/docker-fpm-quagga/manifest.json.j2 b/dockers/docker-fpm-quagga/manifest.json.j2 deleted file mode 100644 index 1f2daf816ea6..000000000000 --- a/dockers/docker-fpm-quagga/manifest.json.j2 +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0", - "swss^1.0.0" - ], - "conflicts": [ - "fpm-gobgp", - "fpm-frr" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": true, - "host-service": false - } -} diff --git a/dockers/docker-iccpd/manifest.json.j2 b/dockers/docker-iccpd/manifest.json.j2 deleted file mode 100644 index bbce95399868..000000000000 --- a/dockers/docker-iccpd/manifest.json.j2 +++ /dev/null @@ -1,17 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0", - "swss^1.0.0" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": false, - "host-service": true - } -} diff --git a/dockers/docker-lldp/manifest.json.j2 b/dockers/docker-lldp/manifest.json.j2 deleted file mode 100644 index d1edab0d4d98..000000000000 --- a/dockers/docker-lldp/manifest.json.j2 +++ /dev/null @@ -1,17 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0", - "swss^1.0.0" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": true, - "host-service": true - } -} diff --git a/dockers/docker-macsec/manifest.json.j2 b/dockers/docker-macsec/manifest.json.j2 deleted file mode 100644 index e21b557a079d..000000000000 --- a/dockers/docker-macsec/manifest.json.j2 +++ /dev/null @@ -1,17 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0", - "swss^1.0.0" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": true, - "host-service": false - } -} diff --git a/dockers/docker-nat/manifest.json.j2 b/dockers/docker-nat/manifest.json.j2 deleted file mode 100644 index bbce95399868..000000000000 --- a/dockers/docker-nat/manifest.json.j2 +++ /dev/null @@ -1,17 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0", - "swss^1.0.0" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": false, - "host-service": true - } -} diff --git a/dockers/docker-orchagent/manifest.json.j2 b/dockers/docker-orchagent/manifest.json.j2 deleted file mode 100644 index ac3d07d87564..000000000000 --- a/dockers/docker-orchagent/manifest.json.j2 +++ /dev/null @@ -1,17 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0", - "syncd^1.0.0" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": true, - "host-service": false - } -} diff --git a/dockers/docker-platform-monitor/manifest.json.j2 b/dockers/docker-platform-monitor/manifest.json.j2 deleted file mode 100644 index 11e5a832d39c..000000000000 --- a/dockers/docker-platform-monitor/manifest.json.j2 +++ /dev/null @@ -1,16 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": false, - "host-service": true - } -} diff --git a/dockers/docker-router-advertiser/manifest.json.j2 b/dockers/docker-router-advertiser/manifest.json.j2 deleted file mode 100644 index 11e5a832d39c..000000000000 --- a/dockers/docker-router-advertiser/manifest.json.j2 +++ /dev/null @@ -1,16 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": false, - "host-service": true - } -} diff --git a/dockers/docker-sflow/manifest.json.j2 b/dockers/docker-sflow/manifest.json.j2 deleted file mode 100644 index bbce95399868..000000000000 --- a/dockers/docker-sflow/manifest.json.j2 +++ /dev/null @@ -1,17 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0", - "swss^1.0.0" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": false, - "host-service": true - } -} diff --git a/dockers/docker-snmp/manifest.json.j2 b/dockers/docker-snmp/manifest.json.j2 deleted file mode 100644 index bbce95399868..000000000000 --- a/dockers/docker-snmp/manifest.json.j2 +++ /dev/null @@ -1,17 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0", - "swss^1.0.0" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": false, - "host-service": true - } -} diff --git a/dockers/docker-sonic-mgmt-framework/manifest.json.j2 b/dockers/docker-sonic-mgmt-framework/manifest.json.j2 deleted file mode 100644 index bbce95399868..000000000000 --- a/dockers/docker-sonic-mgmt-framework/manifest.json.j2 +++ /dev/null @@ -1,17 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0", - "swss^1.0.0" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": false, - "host-service": true - } -} diff --git a/dockers/docker-sonic-restapi/manifest.json.j2 b/dockers/docker-sonic-restapi/manifest.json.j2 deleted file mode 100644 index bbce95399868..000000000000 --- a/dockers/docker-sonic-restapi/manifest.json.j2 +++ /dev/null @@ -1,17 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0", - "swss^1.0.0" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": false, - "host-service": true - } -} diff --git a/dockers/docker-sonic-telemetry/manifest.json.j2 b/dockers/docker-sonic-telemetry/manifest.json.j2 deleted file mode 100644 index bbce95399868..000000000000 --- a/dockers/docker-sonic-telemetry/manifest.json.j2 +++ /dev/null @@ -1,17 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0", - "swss^1.0.0" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": false, - "host-service": true - } -} diff --git a/dockers/docker-teamd/manifest.json.j2 b/dockers/docker-teamd/manifest.json.j2 deleted file mode 100644 index e21b557a079d..000000000000 --- a/dockers/docker-teamd/manifest.json.j2 +++ /dev/null @@ -1,17 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0", - "swss^1.0.0" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": true, - "host-service": false - } -} diff --git a/files/build_templates/manifest.json.j2 b/files/build_templates/manifest.json.j2 new file mode 100644 index 000000000000..51bf5a0b270a --- /dev/null +++ b/files/build_templates/manifest.json.j2 @@ -0,0 +1,27 @@ +{ + "version": "1.0.0", + "package": { + "version": "{{ version }}", + "base-os-contraint": "^{{ base_os_ver.split('.')[0] }}.0.0", + "depends": {{ depends.split()|json if depends is defined else []}}, + "name": "{{ package_name }}" + }, + "service": { + "name": "{{ name }}", + "requires": {{ requires.split()|json if requires is defined else [] }}, + "after": {{ after.split()|json if after is defined else [] }}, + "before": {{ before.split()|json if before is defined else [] }}, + "dependent-of": {{ dependent_of.split()|json if dependent_of is defined else [] }}, + "asic-service": {{ asic_service }}, + "host-service": {{ host_service }} + }, + "container": { + "privileged": {{ privileged if privileged else 'false' }}, + "volumes": {{ volumes.split()|json if volumes is defined else [] }}, + "tmpfs": {{ tmpfs.split()|json if tmpfs is defined else [] }} + }, + "cli": { + "config": "{{ config_cli_plugin|default('') }}", + "show": "{{ show_cli_plugin|default('') }}" + } +} diff --git a/platform/barefoot/docker-syncd-bfn/manifest.json.j2 b/platform/barefoot/docker-syncd-bfn/manifest.json.j2 deleted file mode 120000 index affca28ad9a9..000000000000 --- a/platform/barefoot/docker-syncd-bfn/manifest.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/broadcom/docker-syncd-brcm/manifest.json.j2 b/platform/broadcom/docker-syncd-brcm/manifest.json.j2 deleted file mode 120000 index affca28ad9a9..000000000000 --- a/platform/broadcom/docker-syncd-brcm/manifest.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/cavium/docker-syncd-cavm/manifest.json.j2 b/platform/cavium/docker-syncd-cavm/manifest.json.j2 deleted file mode 120000 index affca28ad9a9..000000000000 --- a/platform/cavium/docker-syncd-cavm/manifest.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/centec-arm64/docker-syncd-centec/manifest.json.j2 b/platform/centec-arm64/docker-syncd-centec/manifest.json.j2 deleted file mode 120000 index affca28ad9a9..000000000000 --- a/platform/centec-arm64/docker-syncd-centec/manifest.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/centec/docker-syncd-centec/manifest.json.j2 b/platform/centec/docker-syncd-centec/manifest.json.j2 deleted file mode 120000 index affca28ad9a9..000000000000 --- a/platform/centec/docker-syncd-centec/manifest.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/innovium/docker-syncd-invm/manifest.json.j2 b/platform/innovium/docker-syncd-invm/manifest.json.j2 deleted file mode 120000 index affca28ad9a9..000000000000 --- a/platform/innovium/docker-syncd-invm/manifest.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/marvell-arm64/docker-syncd-mrvl/manifest.json.j2 b/platform/marvell-arm64/docker-syncd-mrvl/manifest.json.j2 deleted file mode 120000 index affca28ad9a9..000000000000 --- a/platform/marvell-arm64/docker-syncd-mrvl/manifest.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/marvell-armhf/docker-syncd-mrvl/manifest.json.j2 b/platform/marvell-armhf/docker-syncd-mrvl/manifest.json.j2 deleted file mode 120000 index affca28ad9a9..000000000000 --- a/platform/marvell-armhf/docker-syncd-mrvl/manifest.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/marvell/docker-syncd-mrvl/manifest.json.j2 b/platform/marvell/docker-syncd-mrvl/manifest.json.j2 deleted file mode 120000 index affca28ad9a9..000000000000 --- a/platform/marvell/docker-syncd-mrvl/manifest.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/mellanox/docker-syncd-mlnx/manifest.json.j2 b/platform/mellanox/docker-syncd-mlnx/manifest.json.j2 deleted file mode 120000 index affca28ad9a9..000000000000 --- a/platform/mellanox/docker-syncd-mlnx/manifest.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/nephos/docker-syncd-nephos/manifest.json.j2 b/platform/nephos/docker-syncd-nephos/manifest.json.j2 deleted file mode 120000 index affca28ad9a9..000000000000 --- a/platform/nephos/docker-syncd-nephos/manifest.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/vs/docker-gbsyncd-vs/manifest.json.j2 b/platform/vs/docker-gbsyncd-vs/manifest.json.j2 deleted file mode 120000 index affca28ad9a9..000000000000 --- a/platform/vs/docker-gbsyncd-vs/manifest.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../../template/manifest.json.j2 \ No newline at end of file diff --git a/platform/vs/docker-syncd-vs/manifest.json.j2 b/platform/vs/docker-syncd-vs/manifest.json.j2 deleted file mode 120000 index affca28ad9a9..000000000000 --- a/platform/vs/docker-syncd-vs/manifest.json.j2 +++ /dev/null @@ -1 +0,0 @@ -../../template/manifest.json.j2 \ No newline at end of file diff --git a/scripts/j2cli/json_filter.py b/scripts/j2cli/json_filter.py new file mode 100644 index 000000000000..62b35ab22dc3 --- /dev/null +++ b/scripts/j2cli/json_filter.py @@ -0,0 +1,12 @@ +import json + + +def extra_filters(): + """ Declare some custom filters. + + Returns: dict(name = function) + """ + return dict( + json=json.dumps, + ) + diff --git a/slave.mk b/slave.mk index 362f4bd0560d..d0adbdc2f5a6 100644 --- a/slave.mk +++ b/slave.mk @@ -737,7 +737,24 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_pydebs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_PYTHON_DEBS)))\n" | awk '!a[$$0]++')) $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_whls=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_PYTHON_WHEELS)))\n" | awk '!a[$$0]++')) $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_dbgs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_DBG_PACKAGES)))\n" | awk '!a[$$0]++')) + $(eval export version=$($*.gz_VERSION)) + $(eval export name=$($*.gz_CONTAINER_NAME)) + $(eval export package_name=$($*.gz_PACKAGE_NAME)) + $(eval export base_os_ver=$(BASE_OS_COMPATIBILITY_VERSION)) + $(eval export asic_service=$(shell [ -f files/build_templates/per_namespace/$(name).service.j2 ] && echo true || echo false)) + $(eval export host_service=$(shell [ -f files/build_templates/$(name).service.j2 ] && echo true || echo false)) + $(eval export depends=$($*.gz_PACKAGE_DEPENDS)) + $(eval export requires=$($*.gz_SERVICE_REQUIRES)) + $(eval export after=$($*.gz_SERVICE_AFTER)) + $(eval export before=$($*.gz_SERVICE_BEFORE)) + $(eval export dependent_of=$($*.gz_SERVICE_DEPENDENT_OF)) + $(eval export privileged=$($*.gz_CONTAINER_PRIVILEGED)) + $(eval export volumes=$($*.gz_CONTAINER_VOLUMES)) + $(eval export tmpfs=$($*.gz_CONTAINER_TMPFS)) + $(eval export config_cli_plugin=$($*.gz_CLI_CONFIG_PLUGIN)) + $(eval export show_cli_plugin=$($*.gz_CLI_SHOW_PLUGIN)) j2 $($*.gz_PATH)/Dockerfile.j2 > $($*.gz_PATH)/Dockerfile + j2 --customize scripts/j2cli/json_filter.py files/build_templates/manifest.json.j2 > $($*.gz_PATH)/manifest.json # Prepare docker build info PACKAGE_URL_PREFIX=$(PACKAGE_URL_PREFIX) \ SONIC_ENFORCE_VERSIONS=$(SONIC_ENFORCE_VERSIONS) \ @@ -753,13 +770,7 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform --build-arg docker_container_name=$($*.gz_CONTAINER_NAME) \ --build-arg frr_user_uid=$(FRR_USER_UID) \ --build-arg frr_user_gid=$(FRR_USER_GID) \ - --build-arg \ - manifest='$(shell \ - [ -f $($*.gz_PATH)/manifest.json.j2 ] && \ - version=$($*.gz_VERSION) \ - name=$($*.gz_CONTAINER_NAME) \ - package_name=$($*.gz_PACKAGE_NAME) \ - j2 $($*.gz_PATH)/manifest.json.j2)' \ + --build-arg manifest="$$(cat $($*.gz_PATH)/manifest.json)" \ --build-arg image_version=$(SONIC_IMAGE_VERSION) \ --label Tag=$(SONIC_IMAGE_VERSION) \ -t $* $($*.gz_PATH) $(LOG) From 422c2451f8758bf37be72e524b589e2606e49bce Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Sat, 30 Jan 2021 20:19:17 +0200 Subject: [PATCH 11/21] tag SONiC images the old way Signed-off-by: Stepan Blyschak --- files/build_templates/sonic_debian_extension.j2 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index 5b8ac0a54db6..8d583ef692f1 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -580,14 +580,13 @@ sudo mount --bind target $FILESYSTEM_ROOT/target sudo chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS info {% for image in installer_images.strip().split(' ') -%} {% set imagefilepath = image.split(':')|first -%} -{% set imageversion = image.split(':')|last -%} {% set imagefilename = imagefilepath.split('/')|last -%} {% set imagename = imagefilename.split('.')|first -%} sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS load -i {{imagefilepath}} -sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagename}}:{{imageversion}} +sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagename}}:"${SONIC_IMAGE_VERSION}" {% if imagename.endswith('-dbg') %} {% set imagebasename = imagename.replace('-dbg', '') -%} -sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagebasename}}:{{imageversion}} +sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagebasename}}:"${SONIC_IMAGE_VERSION}" sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagebasename}}:latest {% endif %} {% endfor %} From 888a0eaa230ef63ea3a21550652570319e50cabd Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Sat, 30 Jan 2021 21:45:36 +0200 Subject: [PATCH 12/21] check if docker has correct manifest after loading it Signed-off-by: Stepan Blyschak --- files/build_templates/sonic_debian_extension.j2 | 7 +++++++ sonic-slave-buster/Dockerfile.j2 | 1 + sonic-slave-jessie/Dockerfile.j2 | 1 + sonic-slave-stretch/Dockerfile.j2 | 1 + 4 files changed, 10 insertions(+) diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index aaf7736451c6..bd578bea27d6 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -586,6 +586,13 @@ sudo chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS info {% set imagename = imagefilename.split('.')|first -%} sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS load -i {{imagefilepath}} sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagename}}:"${SONIC_IMAGE_VERSION}" +# Check if manifest exists for {{imagename}} and it is a valid JSON +sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS inspect {{imagename}}:latest \ + | jq '.[0].Config.Labels["com.azure.sonic.manifest"]' -r \ + | jq -e || { + >&2 echo "docker image {{imagename}} has no manifest or manifest is not a valid JSON" + exit 1 +} {% if imagename.endswith('-dbg') %} {% set imagebasename = imagename.replace('-dbg', '') -%} sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagebasename}}:"${SONIC_IMAGE_VERSION}" diff --git a/sonic-slave-buster/Dockerfile.j2 b/sonic-slave-buster/Dockerfile.j2 index 61ece64a1139..cdb5b5348bcc 100644 --- a/sonic-slave-buster/Dockerfile.j2 +++ b/sonic-slave-buster/Dockerfile.j2 @@ -78,6 +78,7 @@ RUN apt-get update && apt-get install -y \ dh-systemd \ libzmq5 \ libzmq3-dev \ + jq \ # For quagga build libreadline-dev \ texlive-latex-base \ diff --git a/sonic-slave-jessie/Dockerfile.j2 b/sonic-slave-jessie/Dockerfile.j2 index f103dfb789b9..17e6827d1985 100644 --- a/sonic-slave-jessie/Dockerfile.j2 +++ b/sonic-slave-jessie/Dockerfile.j2 @@ -63,6 +63,7 @@ RUN apt-get update && apt-get install -y \ perl-modules \ libswitch-perl \ dh-systemd \ + jq \ # For quagga build libreadline-dev \ texlive-latex-base \ diff --git a/sonic-slave-stretch/Dockerfile.j2 b/sonic-slave-stretch/Dockerfile.j2 index 103a9cd77831..ecdbcd4197ee 100644 --- a/sonic-slave-stretch/Dockerfile.j2 +++ b/sonic-slave-stretch/Dockerfile.j2 @@ -76,6 +76,7 @@ RUN apt-get update && apt-get install -y \ dh-systemd \ libzmq5 \ libzmq3-dev \ + jq \ # For quagga build libreadline-dev \ texlive-latex-base \ From 53631d73ac0163b824ca07007028f4ea1772a870 Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak Date: Mon, 15 Feb 2021 17:03:36 +0200 Subject: [PATCH 13/21] fix checking manifest Signed-off-by: Stepan Blyshchak --- files/build_templates/sonic_debian_extension.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index bd578bea27d6..b27d7c6343e5 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -588,8 +588,8 @@ sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS lo sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS tag {{imagename}}:latest {{imagename}}:"${SONIC_IMAGE_VERSION}" # Check if manifest exists for {{imagename}} and it is a valid JSON sudo LANG=C chroot $FILESYSTEM_ROOT docker $SONIC_NATIVE_DOCKERD_FOR_DOCKERFS inspect {{imagename}}:latest \ - | jq '.[0].Config.Labels["com.azure.sonic.manifest"]' -r \ - | jq -e || { + | jq '.[0].Config.Labels["com.azure.sonic.manifest"]' -r > /tmp/manifest.json +jq -e . /tmp/manifest.json || { >&2 echo "docker image {{imagename}} has no manifest or manifest is not a valid JSON" exit 1 } From 3de0cb358a8146267430e28d4a201d2aff69de69 Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Thu, 25 Mar 2021 17:02:13 +0200 Subject: [PATCH 14/21] remove obsolete file Signed-off-by: Stepan Blyschak --- platform/template/manifest.json.j2 | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 platform/template/manifest.json.j2 diff --git a/platform/template/manifest.json.j2 b/platform/template/manifest.json.j2 deleted file mode 100644 index 7c2528a3bb43..000000000000 --- a/platform/template/manifest.json.j2 +++ /dev/null @@ -1,16 +0,0 @@ -{ - "version": "1.0.0", - "package": { - "version": "{{ version }}", - "base-os-contraint": "^1.0.0", - "depends": [ - "database^1.0.0" - ], - "name": "{{ package_name }}" - }, - "service": { - "name": "{{ name }}", - "asic-service": true, - "host-service": false - } -} From b2f8fc9d4afe2ab211a7f6e061a8b73ab6dc278d Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Mon, 29 Mar 2021 16:48:51 +0300 Subject: [PATCH 15/21] remove obsolete field from manifest. will be replaced by base-os components approacgh Signed-off-by: Stepan Blyschak --- files/build_templates/manifest.json.j2 | 1 - 1 file changed, 1 deletion(-) diff --git a/files/build_templates/manifest.json.j2 b/files/build_templates/manifest.json.j2 index 51bf5a0b270a..5b09e1d987bc 100644 --- a/files/build_templates/manifest.json.j2 +++ b/files/build_templates/manifest.json.j2 @@ -2,7 +2,6 @@ "version": "1.0.0", "package": { "version": "{{ version }}", - "base-os-contraint": "^{{ base_os_ver.split('.')[0] }}.0.0", "depends": {{ depends.split()|json if depends is defined else []}}, "name": "{{ package_name }}" }, From 84bf4dd6280f241431be1c83d83a20a310370516 Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Fri, 9 Apr 2021 15:18:40 +0300 Subject: [PATCH 16/21] fix review comments Signed-off-by: Stepan Blyschak --- dockers/docker-database/Dockerfile.j2 | 2 -- dockers/docker-dhcp-relay/Dockerfile.j2 | 2 -- dockers/docker-fpm-frr/Dockerfile.j2 | 2 -- dockers/docker-fpm-gobgp/Dockerfile.j2 | 2 -- dockers/docker-fpm-quagga/Dockerfile.j2 | 2 -- dockers/docker-iccpd/Dockerfile.j2 | 2 -- dockers/docker-lldp/Dockerfile.j2 | 2 -- dockers/docker-macsec/Dockerfile.j2 | 2 -- dockers/docker-nat/Dockerfile.j2 | 2 -- dockers/docker-orchagent/Dockerfile.j2 | 2 -- dockers/docker-platform-monitor/Dockerfile.j2 | 2 -- dockers/docker-router-advertiser/Dockerfile.j2 | 2 -- dockers/docker-sflow/Dockerfile.j2 | 2 -- dockers/docker-snmp/Dockerfile.j2 | 2 -- dockers/docker-sonic-mgmt-framework/Dockerfile.j2 | 2 -- dockers/docker-sonic-restapi/Dockerfile.j2 | 2 -- dockers/docker-sonic-telemetry/Dockerfile.j2 | 2 -- dockers/docker-teamd/Dockerfile.j2 | 2 -- platform/barefoot/docker-syncd-bfn/Dockerfile.j2 | 2 -- platform/broadcom/docker-syncd-brcm/Dockerfile.j2 | 2 -- platform/cavium/docker-syncd-cavm/Dockerfile.j2 | 2 -- platform/centec-arm64/docker-syncd-centec/Dockerfile.j2 | 2 -- platform/centec/docker-syncd-centec/Dockerfile.j2 | 2 -- platform/innovium/docker-syncd-invm/Dockerfile.j2 | 2 -- platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2 | 2 -- platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 | 2 -- platform/marvell/docker-syncd-mrvl/Dockerfile.j2 | 2 -- platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 | 2 -- platform/nephos/docker-syncd-nephos/Dockerfile.j2 | 2 -- platform/vs/docker-gbsyncd-vs/Dockerfile.j2 | 2 -- platform/vs/docker-syncd-vs/Dockerfile.j2 | 2 -- slave.mk | 3 +-- 32 files changed, 1 insertion(+), 64 deletions(-) diff --git a/dockers/docker-database/Dockerfile.j2 b/dockers/docker-database/Dockerfile.j2 index 9a5d9b5fe4c2..9debbe2423d3 100644 --- a/dockers/docker-database/Dockerfile.j2 +++ b/dockers/docker-database/Dockerfile.j2 @@ -62,6 +62,4 @@ COPY ["critical_processes", "/etc/supervisor"] COPY ["files/update_chassisdb_config", "/usr/local/bin/"] COPY ["flush_unused_database", "/usr/local/bin/"] -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/docker-database-init.sh"] diff --git a/dockers/docker-dhcp-relay/Dockerfile.j2 b/dockers/docker-dhcp-relay/Dockerfile.j2 index d7de3016b6f0..76a1f1c2a055 100644 --- a/dockers/docker-dhcp-relay/Dockerfile.j2 +++ b/dockers/docker-dhcp-relay/Dockerfile.j2 @@ -35,6 +35,4 @@ COPY ["docker-dhcp-relay.supervisord.conf.j2", "port-name-alias-map.txt.j2", "wa COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/bin/docker_init.sh"] diff --git a/dockers/docker-fpm-frr/Dockerfile.j2 b/dockers/docker-fpm-frr/Dockerfile.j2 index 91a826b90c3a..bde0812975d2 100644 --- a/dockers/docker-fpm-frr/Dockerfile.j2 +++ b/dockers/docker-fpm-frr/Dockerfile.j2 @@ -63,6 +63,4 @@ RUN chmod a+x /usr/bin/TSA && \ chmod a+x /usr/bin/TSC && \ chmod a+x /usr/bin/zsocket.sh -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/bin/docker_init.sh"] diff --git a/dockers/docker-fpm-gobgp/Dockerfile.j2 b/dockers/docker-fpm-gobgp/Dockerfile.j2 index 9c8569450fa2..f61f7fb244d5 100644 --- a/dockers/docker-fpm-gobgp/Dockerfile.j2 +++ b/dockers/docker-fpm-gobgp/Dockerfile.j2 @@ -30,6 +30,4 @@ COPY ["daemons", "/etc/quagga/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-fpm-quagga/Dockerfile.j2 b/dockers/docker-fpm-quagga/Dockerfile.j2 index 5b9aabcb411d..4a34226b022f 100644 --- a/dockers/docker-fpm-quagga/Dockerfile.j2 +++ b/dockers/docker-fpm-quagga/Dockerfile.j2 @@ -38,6 +38,4 @@ COPY ["*.j2", "/usr/share/sonic/templates/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-iccpd/Dockerfile.j2 b/dockers/docker-iccpd/Dockerfile.j2 index 0a42ee0d0a0d..3102bf22c84c 100644 --- a/dockers/docker-iccpd/Dockerfile.j2 +++ b/dockers/docker-iccpd/Dockerfile.j2 @@ -33,6 +33,4 @@ RUN apt-get clean -y && \ apt-get autoremove -y && \ rm -rf /debs -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-lldp/Dockerfile.j2 b/dockers/docker-lldp/Dockerfile.j2 index b0a672aaccec..076018afe25a 100644 --- a/dockers/docker-lldp/Dockerfile.j2 +++ b/dockers/docker-lldp/Dockerfile.j2 @@ -51,6 +51,4 @@ COPY ["lldpmgrd", "/usr/bin/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/bin/docker-lldp-init.sh"] diff --git a/dockers/docker-macsec/Dockerfile.j2 b/dockers/docker-macsec/Dockerfile.j2 index 0deb6777e645..9328b2549d19 100644 --- a/dockers/docker-macsec/Dockerfile.j2 +++ b/dockers/docker-macsec/Dockerfile.j2 @@ -29,6 +29,4 @@ COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] COPY ["etc/wpa_supplicant.conf", "/etc/wpa_supplicant.conf"] -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-nat/Dockerfile.j2 b/dockers/docker-nat/Dockerfile.j2 index 6281ffec2749..7ed5d316419b 100644 --- a/dockers/docker-nat/Dockerfile.j2 +++ b/dockers/docker-nat/Dockerfile.j2 @@ -37,6 +37,4 @@ COPY ["critical_processes", "/etc/supervisor"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-orchagent/Dockerfile.j2 b/dockers/docker-orchagent/Dockerfile.j2 index 06dce5cd4342..a6553f8d202c 100755 --- a/dockers/docker-orchagent/Dockerfile.j2 +++ b/dockers/docker-orchagent/Dockerfile.j2 @@ -77,6 +77,4 @@ COPY ["critical_processes", "/etc/supervisor/"] # Copy all Jinja2 template files into the templates folder COPY ["*.j2", "/usr/share/sonic/templates/"] -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/bin/docker-init.sh"] diff --git a/dockers/docker-platform-monitor/Dockerfile.j2 b/dockers/docker-platform-monitor/Dockerfile.j2 index c5fa00d484ac..63086966eed3 100755 --- a/dockers/docker-platform-monitor/Dockerfile.j2 +++ b/dockers/docker-platform-monitor/Dockerfile.j2 @@ -92,6 +92,4 @@ COPY ["ssd_tools/*", "/usr/bin/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/bin/docker_init.sh"] diff --git a/dockers/docker-router-advertiser/Dockerfile.j2 b/dockers/docker-router-advertiser/Dockerfile.j2 index 1e471898c358..81cd447c7007 100644 --- a/dockers/docker-router-advertiser/Dockerfile.j2 +++ b/dockers/docker-router-advertiser/Dockerfile.j2 @@ -39,6 +39,4 @@ COPY ["radvd.conf.j2", "wait_for_link.sh.j2", "docker-router-advertiser.supervis COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/bin/docker-init.sh"] diff --git a/dockers/docker-sflow/Dockerfile.j2 b/dockers/docker-sflow/Dockerfile.j2 index 5181e7db93bf..474785234c0c 100644 --- a/dockers/docker-sflow/Dockerfile.j2 +++ b/dockers/docker-sflow/Dockerfile.j2 @@ -34,6 +34,4 @@ COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] COPY ["port_index_mapper.py", "/usr/bin"] -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-snmp/Dockerfile.j2 b/dockers/docker-snmp/Dockerfile.j2 index 07ccaa9c5834..392e72ab07bc 100644 --- a/dockers/docker-snmp/Dockerfile.j2 +++ b/dockers/docker-snmp/Dockerfile.j2 @@ -79,6 +79,4 @@ COPY ["critical_processes", "/etc/supervisor"] # Although exposing ports is not needed for host net mode, keep it for possible bridge mode EXPOSE 161/udp 162/udp -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-sonic-mgmt-framework/Dockerfile.j2 b/dockers/docker-sonic-mgmt-framework/Dockerfile.j2 index cb6953d0e595..f937e00f9700 100644 --- a/dockers/docker-sonic-mgmt-framework/Dockerfile.j2 +++ b/dockers/docker-sonic-mgmt-framework/Dockerfile.j2 @@ -55,6 +55,4 @@ RUN apt-get remove -y g++ python3-dev RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-sonic-restapi/Dockerfile.j2 b/dockers/docker-sonic-restapi/Dockerfile.j2 index b3b5542dff3b..999b33a3bd61 100644 --- a/dockers/docker-sonic-restapi/Dockerfile.j2 +++ b/dockers/docker-sonic-restapi/Dockerfile.j2 @@ -27,6 +27,4 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-sonic-telemetry/Dockerfile.j2 b/dockers/docker-sonic-telemetry/Dockerfile.j2 index 8a06a3676141..87f47d0c5383 100644 --- a/dockers/docker-sonic-telemetry/Dockerfile.j2 +++ b/dockers/docker-sonic-telemetry/Dockerfile.j2 @@ -34,6 +34,4 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/dockers/docker-teamd/Dockerfile.j2 b/dockers/docker-teamd/Dockerfile.j2 index 29f8cb3955f0..08963ec45dce 100644 --- a/dockers/docker-teamd/Dockerfile.j2 +++ b/dockers/docker-teamd/Dockerfile.j2 @@ -29,6 +29,4 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor"] -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/barefoot/docker-syncd-bfn/Dockerfile.j2 b/platform/barefoot/docker-syncd-bfn/Dockerfile.j2 index 326c65bace78..baeddf1e6a3a 100755 --- a/platform/barefoot/docker-syncd-bfn/Dockerfile.j2 +++ b/platform/barefoot/docker-syncd-bfn/Dockerfile.j2 @@ -39,6 +39,4 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 b/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 index eb3b96974f47..41de1ca063b1 100755 --- a/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 +++ b/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 @@ -37,6 +37,4 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/cavium/docker-syncd-cavm/Dockerfile.j2 b/platform/cavium/docker-syncd-cavm/Dockerfile.j2 index 3a93f9acb23f..fb19dc9636d4 100755 --- a/platform/cavium/docker-syncd-cavm/Dockerfile.j2 +++ b/platform/cavium/docker-syncd-cavm/Dockerfile.j2 @@ -34,6 +34,4 @@ COPY ["profile.ini", "/etc/ssw/AS7512/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/centec-arm64/docker-syncd-centec/Dockerfile.j2 b/platform/centec-arm64/docker-syncd-centec/Dockerfile.j2 index c00275f75f1c..8a029150413d 100755 --- a/platform/centec-arm64/docker-syncd-centec/Dockerfile.j2 +++ b/platform/centec-arm64/docker-syncd-centec/Dockerfile.j2 @@ -36,6 +36,4 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/centec/docker-syncd-centec/Dockerfile.j2 b/platform/centec/docker-syncd-centec/Dockerfile.j2 index d170761c559b..6ce34616de00 100755 --- a/platform/centec/docker-syncd-centec/Dockerfile.j2 +++ b/platform/centec/docker-syncd-centec/Dockerfile.j2 @@ -32,6 +32,4 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/innovium/docker-syncd-invm/Dockerfile.j2 b/platform/innovium/docker-syncd-invm/Dockerfile.j2 index 3f1a82f28204..e11faf04a2db 100755 --- a/platform/innovium/docker-syncd-invm/Dockerfile.j2 +++ b/platform/innovium/docker-syncd-invm/Dockerfile.j2 @@ -32,6 +32,4 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2 b/platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2 index a7b68a729a2a..4b5aa878a7e6 100755 --- a/platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2 +++ b/platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2 @@ -36,6 +36,4 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 b/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 index a7b68a729a2a..4b5aa878a7e6 100755 --- a/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 +++ b/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 @@ -36,6 +36,4 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/marvell/docker-syncd-mrvl/Dockerfile.j2 b/platform/marvell/docker-syncd-mrvl/Dockerfile.j2 index f75d47070ce6..45c2fd281525 100755 --- a/platform/marvell/docker-syncd-mrvl/Dockerfile.j2 +++ b/platform/marvell/docker-syncd-mrvl/Dockerfile.j2 @@ -32,6 +32,4 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 index d6d253c07070..f4b81a76b45f 100755 --- a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 @@ -47,6 +47,4 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] COPY ["files/supervisor-proc-exit-listener", "/usr/bin"] COPY ["critical_processes", "/etc/supervisor/"] -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/nephos/docker-syncd-nephos/Dockerfile.j2 b/platform/nephos/docker-syncd-nephos/Dockerfile.j2 index 723f16dfe1b1..104e6f29a410 100755 --- a/platform/nephos/docker-syncd-nephos/Dockerfile.j2 +++ b/platform/nephos/docker-syncd-nephos/Dockerfile.j2 @@ -45,6 +45,4 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/vs/docker-gbsyncd-vs/Dockerfile.j2 b/platform/vs/docker-gbsyncd-vs/Dockerfile.j2 index 23c1066de97b..f2c7e22641bf 100644 --- a/platform/vs/docker-gbsyncd-vs/Dockerfile.j2 +++ b/platform/vs/docker-gbsyncd-vs/Dockerfile.j2 @@ -33,6 +33,4 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/platform/vs/docker-syncd-vs/Dockerfile.j2 b/platform/vs/docker-syncd-vs/Dockerfile.j2 index b1b330e66e77..093efd0bc05a 100644 --- a/platform/vs/docker-syncd-vs/Dockerfile.j2 +++ b/platform/vs/docker-syncd-vs/Dockerfile.j2 @@ -33,6 +33,4 @@ COPY ["critical_processes", "/etc/supervisor/"] RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs -LABEL com.azure.sonic.manifest="$manifest" - ENTRYPOINT ["/usr/local/bin/supervisord"] diff --git a/slave.mk b/slave.mk index 9617a8c314fd..9388b1de5a15 100644 --- a/slave.mk +++ b/slave.mk @@ -744,7 +744,6 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform $(eval export version=$($*.gz_VERSION)) $(eval export name=$($*.gz_CONTAINER_NAME)) $(eval export package_name=$($*.gz_PACKAGE_NAME)) - $(eval export base_os_ver=$(BASE_OS_COMPATIBILITY_VERSION)) $(eval export asic_service=$(shell [ -f files/build_templates/per_namespace/$(name).service.j2 ] && echo true || echo false)) $(eval export host_service=$(shell [ -f files/build_templates/$(name).service.j2 ] && echo true || echo false)) $(eval export depends=$($*.gz_PACKAGE_DEPENDS)) @@ -774,8 +773,8 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform --build-arg docker_container_name=$($*.gz_CONTAINER_NAME) \ --build-arg frr_user_uid=$(FRR_USER_UID) \ --build-arg frr_user_gid=$(FRR_USER_GID) \ - --build-arg manifest="$$(cat $($*.gz_PATH)/manifest.json)" \ --build-arg image_version=$(SONIC_IMAGE_VERSION) \ + --label com.azure.sonic.manifest="$$(cat $($*.gz_PATH)/manifest.json)" \ --label Tag=$(SONIC_IMAGE_VERSION) \ -t $* $($*.gz_PATH) $(LOG) scripts/collect_docker_version_files.sh $* $(TARGET_PATH) From b427b71db2c17fa8fbb2c4ff7c02d5a96ed7f157 Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Mon, 12 Apr 2021 20:49:56 +0300 Subject: [PATCH 17/21] fix review comments Signed-off-by: Stepan Blyschak --- .gitignore | 4 +-- platform/barefoot/docker-syncd-bfn-rpc.mk | 2 +- platform/broadcom/docker-syncd-brcm-rpc.mk | 2 +- platform/cavium/docker-syncd-cavm-rpc.mk | 2 +- .../centec-arm64/docker-syncd-centec-rpc.mk | 2 +- platform/centec/docker-syncd-centec-rpc.mk | 2 +- platform/innovium/docker-syncd-invm-rpc.mk | 2 +- .../marvell-arm64/docker-syncd-mrvl-rpc.mk | 2 +- .../marvell-armhf/docker-syncd-mrvl-rpc.mk | 2 +- platform/marvell/docker-syncd-mrvl-rpc.mk | 2 +- platform/mellanox/docker-syncd-mlnx-rpc.mk | 2 +- platform/nephos/docker-syncd-nephos-rpc.mk | 2 +- rules/functions | 30 +++++++++++++++++++ slave.mk | 20 ++----------- 14 files changed, 46 insertions(+), 30 deletions(-) diff --git a/.gitignore b/.gitignore index c111efee1180..d608aea9fa3b 100644 --- a/.gitignore +++ b/.gitignore @@ -29,8 +29,8 @@ dockers/*/Dockerfile platform/*/docker-*/Dockerfile # Autogenerated manifest files -dockers/*/manifest.json -platform/*/docker-*/manifest.json +dockers/*/*manifest* +platform/*/docker-*/*manifest* # Installer-related files and directories installer/x86_64/platforms/ diff --git a/platform/barefoot/docker-syncd-bfn-rpc.mk b/platform/barefoot/docker-syncd-bfn-rpc.mk index e14ff946384a..451289d727de 100644 --- a/platform/barefoot/docker-syncd-bfn-rpc.mk +++ b/platform/barefoot/docker-syncd-bfn-rpc.mk @@ -17,7 +17,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BFN_RPC) endif $(DOCKER_SYNCD_BFN_RPC)_CONTAINER_NAME = syncd -$(DOCKER_SYNCD_BFN_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BFN_RPC)_VERSION = 1.0.0-rpc $(DOCKER_SYNCD_BFN_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_BFN_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/broadcom/docker-syncd-brcm-rpc.mk b/platform/broadcom/docker-syncd-brcm-rpc.mk index 229a3ca08e25..7ee58dda4514 100644 --- a/platform/broadcom/docker-syncd-brcm-rpc.mk +++ b/platform/broadcom/docker-syncd-brcm-rpc.mk @@ -17,7 +17,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_BRCM_RPC) endif $(DOCKER_SYNCD_BRCM_RPC)_CONTAINER_NAME = syncd -$(DOCKER_SYNCD_BRCM_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_BRCM_RPC)_VERSION = 1.0.0-rpc $(DOCKER_SYNCD_BRCM_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_BRCM_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/cavium/docker-syncd-cavm-rpc.mk b/platform/cavium/docker-syncd-cavm-rpc.mk index 5112c1b39006..8dfd294b0f43 100644 --- a/platform/cavium/docker-syncd-cavm-rpc.mk +++ b/platform/cavium/docker-syncd-cavm-rpc.mk @@ -17,7 +17,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CAVM_RPC) endif $(DOCKER_SYNCD_CAVM_RPC)_CONTAINER_NAME = syncd -$(DOCKER_SYNCD_CAVM_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_CAVM_RPC)_VERSION = 1.0.0-rpc $(DOCKER_SYNCD_CAVM_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_CAVM_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_CAVM_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/centec-arm64/docker-syncd-centec-rpc.mk b/platform/centec-arm64/docker-syncd-centec-rpc.mk index ae85bbc1d82b..7b6be9cdb3cc 100755 --- a/platform/centec-arm64/docker-syncd-centec-rpc.mk +++ b/platform/centec-arm64/docker-syncd-centec-rpc.mk @@ -17,7 +17,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC_RPC) endif $(DOCKER_SYNCD_CENTEC_RPC)_CONTAINER_NAME = syncd -$(DOCKER_SYNCD_CENTEC_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_CENTEC_RPC)_VERSION = 1.0.0-rpc $(DOCKER_SYNCD_CENTEC_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/centec/docker-syncd-centec-rpc.mk b/platform/centec/docker-syncd-centec-rpc.mk index 73fdde7262fb..88c101182bb8 100644 --- a/platform/centec/docker-syncd-centec-rpc.mk +++ b/platform/centec/docker-syncd-centec-rpc.mk @@ -17,7 +17,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC_RPC) endif $(DOCKER_SYNCD_CENTEC_RPC)_CONTAINER_NAME = syncd -$(DOCKER_SYNCD_CENTEC_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_CENTEC_RPC)_VERSION = 1.0.0-rpc $(DOCKER_SYNCD_CENTEC_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_CENTEC_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/innovium/docker-syncd-invm-rpc.mk b/platform/innovium/docker-syncd-invm-rpc.mk index 65e1febf99a2..e56570d705ba 100755 --- a/platform/innovium/docker-syncd-invm-rpc.mk +++ b/platform/innovium/docker-syncd-invm-rpc.mk @@ -10,7 +10,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_INVM_RPC) endif $(DOCKER_SYNCD_INVM_RPC)_CONTAINER_NAME = syncd -$(DOCKER_SYNCD_INVM_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_INVM_RPC)_VERSION = 1.0.0-rpc $(DOCKER_SYNCD_INVM_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_INVM_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_INVM_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk b/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk index c63c59006e93..414bc500b453 100644 --- a/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk +++ b/platform/marvell-arm64/docker-syncd-mrvl-rpc.mk @@ -18,7 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL_RPC) endif $(DOCKER_SYNCD_MRVL_RPC)_CONTAINER_NAME = syncd -$(DOCKER_SYNCD_MRVL_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_MRVL_RPC)_VERSION = 1.0.0-rpc $(DOCKER_SYNCD_MRVL_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk b/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk index c63c59006e93..414bc500b453 100644 --- a/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk +++ b/platform/marvell-armhf/docker-syncd-mrvl-rpc.mk @@ -18,7 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL_RPC) endif $(DOCKER_SYNCD_MRVL_RPC)_CONTAINER_NAME = syncd -$(DOCKER_SYNCD_MRVL_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_MRVL_RPC)_VERSION = 1.0.0-rpc $(DOCKER_SYNCD_MRVL_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/marvell/docker-syncd-mrvl-rpc.mk b/platform/marvell/docker-syncd-mrvl-rpc.mk index c63c59006e93..414bc500b453 100644 --- a/platform/marvell/docker-syncd-mrvl-rpc.mk +++ b/platform/marvell/docker-syncd-mrvl-rpc.mk @@ -18,7 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MRVL_RPC) endif $(DOCKER_SYNCD_MRVL_RPC)_CONTAINER_NAME = syncd -$(DOCKER_SYNCD_MRVL_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_MRVL_RPC)_VERSION = 1.0.0-rpc $(DOCKER_SYNCD_MRVL_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_MRVL_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/mellanox/docker-syncd-mlnx-rpc.mk b/platform/mellanox/docker-syncd-mlnx-rpc.mk index 52085e06f750..fe2ff5916493 100644 --- a/platform/mellanox/docker-syncd-mlnx-rpc.mk +++ b/platform/mellanox/docker-syncd-mlnx-rpc.mk @@ -20,7 +20,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_MLNX_RPC) endif $(DOCKER_SYNCD_MLNX_RPC)_CONTAINER_NAME = syncd -$(DOCKER_SYNCD_MLNX_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_MLNX_RPC)_VERSION = 1.0.0-rpc $(DOCKER_SYNCD_MLNX_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += --privileged -t $(DOCKER_SYNCD_MLNX_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/platform/nephos/docker-syncd-nephos-rpc.mk b/platform/nephos/docker-syncd-nephos-rpc.mk index edc4ffe56076..ea514712c59f 100644 --- a/platform/nephos/docker-syncd-nephos-rpc.mk +++ b/platform/nephos/docker-syncd-nephos-rpc.mk @@ -18,7 +18,7 @@ SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_NEPHOS_RPC) endif $(DOCKER_SYNCD_NEPHOS_RPC)_CONTAINER_NAME = syncd -$(DOCKER_SYNCD_NEPHOS_RPC)_VERSION = 1.0.0 +$(DOCKER_SYNCD_NEPHOS_RPC)_VERSION = 1.0.0-rpc $(DOCKER_SYNCD_NEPHOS_RPC)_PACKAGE_NAME = syncd $(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += --net=host --privileged -t $(DOCKER_SYNCD_NEPHOS_RPC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf diff --git a/rules/functions b/rules/functions index c6caebe82858..0a4842ab3a12 100644 --- a/rules/functions +++ b/rules/functions @@ -166,3 +166,33 @@ sudo mount -t overlay overlay -olowerdir=/var/lib/dpkg,upperdir=$$upperdir,workd export SONIC_DPKG_ADMINDIR=$$mergedir trap "sudo umount $$mergedir && rm -rf $$mergedir $$upperdir $$workdir" EXIT endef + + +############################################################### +## Manifest generation routine +### +define generate_manifest + $(eval export version=$($(1).gz_VERSION)$(2)) + $(eval export name=$($(1).gz_CONTAINER_NAME)) + $(eval export package_name=$($(1).gz_PACKAGE_NAME)) + $(eval export asic_service=$(shell [ -f files/build_templates/per_namespace/$(name).service.j2 ] && echo true || echo false)) + $(eval export host_service=$(shell [ -f files/build_templates/$(name).service.j2 ] && echo true || echo false)) + $(eval export depends=$($(1).gz_PACKAGE_DEPENDS)) + $(eval export requires=$($(1).gz_SERVICE_REQUIRES)) + $(eval export after=$($(1).gz_SERVICE_AFTER)) + $(eval export before=$($(1).gz_SERVICE_BEFORE)) + $(eval export dependent_of=$($(1).gz_SERVICE_DEPENDENT_OF)) + $(eval export privileged=$($(1).gz_CONTAINER_PRIVILEGED)) + $(eval export volumes=$($(1).gz_CONTAINER_VOLUMES)) + $(eval export tmpfs=$($(1).gz_CONTAINER_TMPFS)) + $(eval export config_cli_plugin=$($(1).gz_CLI_CONFIG_PLUGIN)) + $(eval export show_cli_plugin=$($(1).gz_CLI_SHOW_PLUGIN)) + j2 $($*.gz_PATH)/Dockerfile.j2 > $($(1).gz_PATH)/Dockerfile + j2 --customize scripts/j2cli/json_filter.py files/build_templates/manifest.json.j2 > $($(1).gz_PATH)/manifest.common.json + if [ -f $($*.gz_PATH)/manifest.part.json.j2 ]; then + j2 --customize scripts/j2cli/json_filter.py $($(1).gz_PATH)/manifest.part.json.j2 > $($(1).gz_PATH)/manifest.part.json + jq -s '.[0] * .[1]' $($(1).gz_PATH)/manifest.common.json $($(1).gz_PATH)/manifest.part.json > $($(1).gz_PATH)/manifest.json + else + mv $($(1).gz_PATH)/manifest.common.json $($(1).gz_PATH)/manifest.json + fi +endef diff --git a/slave.mk b/slave.mk index 9388b1de5a15..2976b34d4269 100644 --- a/slave.mk +++ b/slave.mk @@ -741,23 +741,7 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_pydebs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_PYTHON_DEBS)))\n" | awk '!a[$$0]++')) $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_whls=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_PYTHON_WHEELS)))\n" | awk '!a[$$0]++')) $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_dbgs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_DBG_PACKAGES)))\n" | awk '!a[$$0]++')) - $(eval export version=$($*.gz_VERSION)) - $(eval export name=$($*.gz_CONTAINER_NAME)) - $(eval export package_name=$($*.gz_PACKAGE_NAME)) - $(eval export asic_service=$(shell [ -f files/build_templates/per_namespace/$(name).service.j2 ] && echo true || echo false)) - $(eval export host_service=$(shell [ -f files/build_templates/$(name).service.j2 ] && echo true || echo false)) - $(eval export depends=$($*.gz_PACKAGE_DEPENDS)) - $(eval export requires=$($*.gz_SERVICE_REQUIRES)) - $(eval export after=$($*.gz_SERVICE_AFTER)) - $(eval export before=$($*.gz_SERVICE_BEFORE)) - $(eval export dependent_of=$($*.gz_SERVICE_DEPENDENT_OF)) - $(eval export privileged=$($*.gz_CONTAINER_PRIVILEGED)) - $(eval export volumes=$($*.gz_CONTAINER_VOLUMES)) - $(eval export tmpfs=$($*.gz_CONTAINER_TMPFS)) - $(eval export config_cli_plugin=$($*.gz_CLI_CONFIG_PLUGIN)) - $(eval export show_cli_plugin=$($*.gz_CLI_SHOW_PLUGIN)) - j2 $($*.gz_PATH)/Dockerfile.j2 > $($*.gz_PATH)/Dockerfile - j2 --customize scripts/j2cli/json_filter.py files/build_templates/manifest.json.j2 > $($*.gz_PATH)/manifest.json + $(call generate_manifest,$*) # Prepare docker build info PACKAGE_URL_PREFIX=$(PACKAGE_URL_PREFIX) \ SONIC_ENFORCE_VERSIONS=$(SONIC_ENFORCE_VERSIONS) \ @@ -810,6 +794,7 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_DBG_IMAGES)) : $(TARGET_PATH)/%-$(DBG_IMAG $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_image_dbgs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_DBG_IMAGE_PACKAGES)))\n" | awk '!a[$$0]++')) ./build_debug_docker_j2.sh $* $(subst -,_,$(notdir $($*.gz_PATH)))_dbg_debs $(subst -,_,$(notdir $($*.gz_PATH)))_image_dbgs > $($*.gz_PATH)/Dockerfile-dbg.j2 j2 $($*.gz_PATH)/Dockerfile-dbg.j2 > $($*.gz_PATH)/Dockerfile-dbg + $(call generate_manifest,$*,-dbg) # Prepare docker build info PACKAGE_URL_PREFIX=$(PACKAGE_URL_PREFIX) \ SONIC_ENFORCE_VERSIONS=$(SONIC_ENFORCE_VERSIONS) \ @@ -821,6 +806,7 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_DBG_IMAGES)) : $(TARGET_PATH)/%-$(DBG_IMAG --build-arg http_proxy=$(HTTP_PROXY) \ --build-arg https_proxy=$(HTTPS_PROXY) \ --build-arg docker_container_name=$($*.gz_CONTAINER_NAME) \ + --label com.azure.sonic.manifest="$$(cat $($*.gz_PATH)/manifest.json)" \ --label Tag=$(SONIC_IMAGE_VERSION) \ --file $($*.gz_PATH)/Dockerfile-dbg \ -t $*-dbg $($*.gz_PATH) $(LOG) From 92ad8b1cfcd4ccbdd8b5b965fb5e2c0f9f9f58c0 Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Mon, 12 Apr 2021 23:53:22 +0300 Subject: [PATCH 18/21] add comment Signed-off-by: Stepan Blyschak --- rules/functions | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rules/functions b/rules/functions index 0a4842ab3a12..4acf75482e92 100644 --- a/rules/functions +++ b/rules/functions @@ -168,9 +168,11 @@ trap "sudo umount $$mergedir && rm -rf $$mergedir $$upperdir $$workdir" EXIT endef -############################################################### +############################################################################### ## Manifest generation routine -### +############################################################### +# call: +# generate_manifest some_docker.gz, version_suffix define generate_manifest $(eval export version=$($(1).gz_VERSION)$(2)) $(eval export name=$($(1).gz_CONTAINER_NAME)) From 57ec2f2723a8e9e8f36fff7f04be96a213cbdd2e Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Thu, 15 Apr 2021 17:53:37 +0300 Subject: [PATCH 19/21] remove not needed ARG in dockerfiles Signed-off-by: Stepan Blyschak --- dockers/docker-database/Dockerfile.j2 | 2 -- dockers/docker-dhcp-relay/Dockerfile.j2 | 2 -- dockers/docker-fpm-frr/Dockerfile.j2 | 2 -- dockers/docker-fpm-gobgp/Dockerfile.j2 | 3 --- dockers/docker-fpm-quagga/Dockerfile.j2 | 2 -- dockers/docker-iccpd/Dockerfile.j2 | 2 -- dockers/docker-lldp/Dockerfile.j2 | 2 -- dockers/docker-macsec/Dockerfile.j2 | 1 - dockers/docker-nat/Dockerfile.j2 | 2 -- dockers/docker-orchagent/Dockerfile.j2 | 2 -- dockers/docker-platform-monitor/Dockerfile.j2 | 2 -- dockers/docker-router-advertiser/Dockerfile.j2 | 2 -- dockers/docker-sflow/Dockerfile.j2 | 2 -- dockers/docker-snmp/Dockerfile.j2 | 2 -- dockers/docker-sonic-mgmt-framework/Dockerfile.j2 | 2 -- dockers/docker-sonic-restapi/Dockerfile.j2 | 2 -- dockers/docker-sonic-telemetry/Dockerfile.j2 | 2 -- dockers/docker-teamd/Dockerfile.j2 | 2 -- platform/barefoot/docker-syncd-bfn/Dockerfile.j2 | 1 - platform/broadcom/docker-syncd-brcm/Dockerfile.j2 | 1 - platform/cavium/docker-syncd-cavm/Dockerfile.j2 | 1 - platform/centec-arm64/docker-syncd-centec/Dockerfile.j2 | 1 - platform/centec/docker-syncd-centec/Dockerfile.j2 | 1 - platform/innovium/docker-syncd-invm/Dockerfile.j2 | 1 - platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2 | 1 - platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 | 1 - platform/marvell/docker-syncd-mrvl/Dockerfile.j2 | 1 - platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 | 1 - platform/nephos/docker-syncd-nephos/Dockerfile.j2 | 1 - platform/vs/docker-gbsyncd-vs/Dockerfile.j2 | 1 - platform/vs/docker-syncd-vs/Dockerfile.j2 | 1 - 31 files changed, 49 deletions(-) diff --git a/dockers/docker-database/Dockerfile.j2 b/dockers/docker-database/Dockerfile.j2 index 9debbe2423d3..aef22e24379c 100644 --- a/dockers/docker-database/Dockerfile.j2 +++ b/dockers/docker-database/Dockerfile.j2 @@ -2,8 +2,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest - RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Make apt-get non-interactive diff --git a/dockers/docker-dhcp-relay/Dockerfile.j2 b/dockers/docker-dhcp-relay/Dockerfile.j2 index 76a1f1c2a055..1100aa510742 100644 --- a/dockers/docker-dhcp-relay/Dockerfile.j2 +++ b/dockers/docker-dhcp-relay/Dockerfile.j2 @@ -3,8 +3,6 @@ FROM docker-config-engine-buster ARG docker_container_name ARG image_version -ARG manifest - RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Make apt-get non-interactive diff --git a/dockers/docker-fpm-frr/Dockerfile.j2 b/dockers/docker-fpm-frr/Dockerfile.j2 index bde0812975d2..42df1c6f38f8 100644 --- a/dockers/docker-fpm-frr/Dockerfile.j2 +++ b/dockers/docker-fpm-frr/Dockerfile.j2 @@ -2,8 +2,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest - ARG frr_user_uid ARG frr_user_gid diff --git a/dockers/docker-fpm-gobgp/Dockerfile.j2 b/dockers/docker-fpm-gobgp/Dockerfile.j2 index f61f7fb244d5..65b104e43b26 100644 --- a/dockers/docker-fpm-gobgp/Dockerfile.j2 +++ b/dockers/docker-fpm-gobgp/Dockerfile.j2 @@ -1,8 +1,5 @@ FROM docker-fpm-quagga -ARG docker_container_name -ARG manifest - ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive diff --git a/dockers/docker-fpm-quagga/Dockerfile.j2 b/dockers/docker-fpm-quagga/Dockerfile.j2 index 4a34226b022f..ac382afbe5b2 100644 --- a/dockers/docker-fpm-quagga/Dockerfile.j2 +++ b/dockers/docker-fpm-quagga/Dockerfile.j2 @@ -1,8 +1,6 @@ FROM docker-config-engine ARG docker_container_name -ARG manifest - RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Make apt-get non-interactive diff --git a/dockers/docker-iccpd/Dockerfile.j2 b/dockers/docker-iccpd/Dockerfile.j2 index 3102bf22c84c..51cc306bdd55 100644 --- a/dockers/docker-iccpd/Dockerfile.j2 +++ b/dockers/docker-iccpd/Dockerfile.j2 @@ -2,8 +2,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest - RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive diff --git a/dockers/docker-lldp/Dockerfile.j2 b/dockers/docker-lldp/Dockerfile.j2 index 076018afe25a..a1c7a1c1bee2 100644 --- a/dockers/docker-lldp/Dockerfile.j2 +++ b/dockers/docker-lldp/Dockerfile.j2 @@ -2,9 +2,7 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest ARG image_version - RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Make apt-get non-interactive diff --git a/dockers/docker-macsec/Dockerfile.j2 b/dockers/docker-macsec/Dockerfile.j2 index 9328b2549d19..9bbfd69e8d5b 100644 --- a/dockers/docker-macsec/Dockerfile.j2 +++ b/dockers/docker-macsec/Dockerfile.j2 @@ -2,7 +2,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive diff --git a/dockers/docker-nat/Dockerfile.j2 b/dockers/docker-nat/Dockerfile.j2 index 7ed5d316419b..36a178a68af2 100644 --- a/dockers/docker-nat/Dockerfile.j2 +++ b/dockers/docker-nat/Dockerfile.j2 @@ -2,8 +2,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest - RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf RUN echo diff --git a/dockers/docker-orchagent/Dockerfile.j2 b/dockers/docker-orchagent/Dockerfile.j2 index a6553f8d202c..17c0983c58b2 100755 --- a/dockers/docker-orchagent/Dockerfile.j2 +++ b/dockers/docker-orchagent/Dockerfile.j2 @@ -2,8 +2,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest - RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Make apt-get non-interactive diff --git a/dockers/docker-platform-monitor/Dockerfile.j2 b/dockers/docker-platform-monitor/Dockerfile.j2 index 63086966eed3..e86f4ad0019b 100755 --- a/dockers/docker-platform-monitor/Dockerfile.j2 +++ b/dockers/docker-platform-monitor/Dockerfile.j2 @@ -2,9 +2,7 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest ARG image_version - RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Make apt-get non-interactive diff --git a/dockers/docker-router-advertiser/Dockerfile.j2 b/dockers/docker-router-advertiser/Dockerfile.j2 index 81cd447c7007..7d225cbd4e79 100644 --- a/dockers/docker-router-advertiser/Dockerfile.j2 +++ b/dockers/docker-router-advertiser/Dockerfile.j2 @@ -2,9 +2,7 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest ARG image_version - RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Make apt-get non-interactive diff --git a/dockers/docker-sflow/Dockerfile.j2 b/dockers/docker-sflow/Dockerfile.j2 index 474785234c0c..476ff3514ace 100644 --- a/dockers/docker-sflow/Dockerfile.j2 +++ b/dockers/docker-sflow/Dockerfile.j2 @@ -2,8 +2,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest - RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive diff --git a/dockers/docker-snmp/Dockerfile.j2 b/dockers/docker-snmp/Dockerfile.j2 index 392e72ab07bc..528189c2014f 100644 --- a/dockers/docker-snmp/Dockerfile.j2 +++ b/dockers/docker-snmp/Dockerfile.j2 @@ -2,9 +2,7 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest ARG image_version - RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf # Enable -O for all Python calls diff --git a/dockers/docker-sonic-mgmt-framework/Dockerfile.j2 b/dockers/docker-sonic-mgmt-framework/Dockerfile.j2 index f937e00f9700..5ee8cae84466 100644 --- a/dockers/docker-sonic-mgmt-framework/Dockerfile.j2 +++ b/dockers/docker-sonic-mgmt-framework/Dockerfile.j2 @@ -1,8 +1,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest - RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive diff --git a/dockers/docker-sonic-restapi/Dockerfile.j2 b/dockers/docker-sonic-restapi/Dockerfile.j2 index 999b33a3bd61..837796e66d82 100644 --- a/dockers/docker-sonic-restapi/Dockerfile.j2 +++ b/dockers/docker-sonic-restapi/Dockerfile.j2 @@ -2,8 +2,6 @@ FROM docker-config-engine-stretch ARG docker_container_name -ARG manifest - RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive diff --git a/dockers/docker-sonic-telemetry/Dockerfile.j2 b/dockers/docker-sonic-telemetry/Dockerfile.j2 index 87f47d0c5383..88ff94318208 100644 --- a/dockers/docker-sonic-telemetry/Dockerfile.j2 +++ b/dockers/docker-sonic-telemetry/Dockerfile.j2 @@ -2,9 +2,7 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest ARG image_version - RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive diff --git a/dockers/docker-teamd/Dockerfile.j2 b/dockers/docker-teamd/Dockerfile.j2 index 08963ec45dce..7f4db2936857 100644 --- a/dockers/docker-teamd/Dockerfile.j2 +++ b/dockers/docker-teamd/Dockerfile.j2 @@ -2,8 +2,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest - RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf ## Make apt-get non-interactive diff --git a/platform/barefoot/docker-syncd-bfn/Dockerfile.j2 b/platform/barefoot/docker-syncd-bfn/Dockerfile.j2 index baeddf1e6a3a..7071b0c8b51e 100755 --- a/platform/barefoot/docker-syncd-bfn/Dockerfile.j2 +++ b/platform/barefoot/docker-syncd-bfn/Dockerfile.j2 @@ -1,7 +1,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive diff --git a/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 b/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 index 41de1ca063b1..a70e91bb60b8 100755 --- a/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 +++ b/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 @@ -2,7 +2,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf diff --git a/platform/cavium/docker-syncd-cavm/Dockerfile.j2 b/platform/cavium/docker-syncd-cavm/Dockerfile.j2 index fb19dc9636d4..8ac883e6293d 100755 --- a/platform/cavium/docker-syncd-cavm/Dockerfile.j2 +++ b/platform/cavium/docker-syncd-cavm/Dockerfile.j2 @@ -1,7 +1,6 @@ FROM docker-config-engine ARG docker_container_name -ARG manifest RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf diff --git a/platform/centec-arm64/docker-syncd-centec/Dockerfile.j2 b/platform/centec-arm64/docker-syncd-centec/Dockerfile.j2 index 8a029150413d..7f89c0c98698 100755 --- a/platform/centec-arm64/docker-syncd-centec/Dockerfile.j2 +++ b/platform/centec-arm64/docker-syncd-centec/Dockerfile.j2 @@ -1,7 +1,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf diff --git a/platform/centec/docker-syncd-centec/Dockerfile.j2 b/platform/centec/docker-syncd-centec/Dockerfile.j2 index 6ce34616de00..001e944bb85a 100755 --- a/platform/centec/docker-syncd-centec/Dockerfile.j2 +++ b/platform/centec/docker-syncd-centec/Dockerfile.j2 @@ -1,7 +1,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf diff --git a/platform/innovium/docker-syncd-invm/Dockerfile.j2 b/platform/innovium/docker-syncd-invm/Dockerfile.j2 index e11faf04a2db..4bdc7a6ebef1 100755 --- a/platform/innovium/docker-syncd-invm/Dockerfile.j2 +++ b/platform/innovium/docker-syncd-invm/Dockerfile.j2 @@ -1,7 +1,6 @@ FROM docker-config-engine-stretch ARG docker_container_name -ARG manifest RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf diff --git a/platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2 b/platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2 index 4b5aa878a7e6..6f96738e0d1b 100755 --- a/platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2 +++ b/platform/marvell-arm64/docker-syncd-mrvl/Dockerfile.j2 @@ -1,7 +1,6 @@ FROM docker-config-engine-stretch ARG docker_container_name -ARG manifest RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf diff --git a/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 b/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 index 4b5aa878a7e6..6f96738e0d1b 100755 --- a/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 +++ b/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 @@ -1,7 +1,6 @@ FROM docker-config-engine-stretch ARG docker_container_name -ARG manifest RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf diff --git a/platform/marvell/docker-syncd-mrvl/Dockerfile.j2 b/platform/marvell/docker-syncd-mrvl/Dockerfile.j2 index 45c2fd281525..be69f831720a 100755 --- a/platform/marvell/docker-syncd-mrvl/Dockerfile.j2 +++ b/platform/marvell/docker-syncd-mrvl/Dockerfile.j2 @@ -1,7 +1,6 @@ FROM docker-config-engine-stretch ARG docker_container_name -ARG manifest RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf diff --git a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 index f4b81a76b45f..011931b2ff4b 100755 --- a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 @@ -2,7 +2,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf diff --git a/platform/nephos/docker-syncd-nephos/Dockerfile.j2 b/platform/nephos/docker-syncd-nephos/Dockerfile.j2 index 104e6f29a410..3c7ffa1e49c5 100755 --- a/platform/nephos/docker-syncd-nephos/Dockerfile.j2 +++ b/platform/nephos/docker-syncd-nephos/Dockerfile.j2 @@ -1,7 +1,6 @@ FROM docker-config-engine-stretch ARG docker_container_name -ARG manifest RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf diff --git a/platform/vs/docker-gbsyncd-vs/Dockerfile.j2 b/platform/vs/docker-gbsyncd-vs/Dockerfile.j2 index f2c7e22641bf..a9e7f6f53d2c 100644 --- a/platform/vs/docker-gbsyncd-vs/Dockerfile.j2 +++ b/platform/vs/docker-gbsyncd-vs/Dockerfile.j2 @@ -1,7 +1,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf diff --git a/platform/vs/docker-syncd-vs/Dockerfile.j2 b/platform/vs/docker-syncd-vs/Dockerfile.j2 index 093efd0bc05a..7fc6391f365e 100644 --- a/platform/vs/docker-syncd-vs/Dockerfile.j2 +++ b/platform/vs/docker-syncd-vs/Dockerfile.j2 @@ -1,7 +1,6 @@ FROM docker-config-engine-buster ARG docker_container_name -ARG manifest RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf From aa31898c2a6f1e8a41f21cf98a3f715994e7c979 Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Fri, 23 Apr 2021 13:24:58 +0300 Subject: [PATCH 20/21] fix indentation Signed-off-by: Stepan Blyschak --- slave.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slave.mk b/slave.mk index de65698efe34..c6b86fcd5332 100644 --- a/slave.mk +++ b/slave.mk @@ -748,7 +748,7 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_dbgs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_DBG_PACKAGES)))\n" | awk '!a[$$0]++')) $(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_pkgs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_APT_PACKAGES)))\n" | awk '!a[$$0]++')) j2 $($*.gz_PATH)/Dockerfile.j2 > $($*.gz_PATH)/Dockerfile - $(call generate_manifest,$*) + $(call generate_manifest,$*) # Prepare docker build info PACKAGE_URL_PREFIX=$(PACKAGE_URL_PREFIX) \ SONIC_ENFORCE_VERSIONS=$(SONIC_ENFORCE_VERSIONS) \ From 9e171a5a931abb3160e35d1b2ef77f64c9b8611c Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Fri, 23 Apr 2021 14:34:57 +0300 Subject: [PATCH 21/21] add todo about changelog Signed-off-by: Stepan Blyschak --- rules/functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rules/functions b/rules/functions index 4acf75482e92..479f5f70c4ab 100644 --- a/rules/functions +++ b/rules/functions @@ -170,7 +170,8 @@ endef ############################################################################### ## Manifest generation routine -############################################################### +## TODO: changelog generation +############################################################################### # call: # generate_manifest some_docker.gz, version_suffix define generate_manifest