From 5773ca55d17b1eacdba01baa154af04eedfef5b6 Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak Date: Tue, 3 Nov 2020 13:45:50 +0200 Subject: [PATCH 1/3] [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 +++++++++++++ dockers/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-telemetry/Dockerfile.j2 | 4 ++++ dockers/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 +++++++++++++++++ files/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 +++++ .../barefoot/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 ++++ .../broadcom/docker-syncd-brcm/manifest.json.j2 | 1 + platform/cavium/docker-syncd-cavm-rpc.mk | 1 + platform/cavium/docker-syncd-cavm.mk | 1 + platform/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 ++++ .../centec/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 ++++ .../innovium/docker-syncd-invm/manifest.json.j2 | 1 + platform/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 + platform/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 ++++ .../marvell/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 ++++ .../mellanox/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 ++++ .../nephos/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 ++++ platform/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 ++++++++++- 105 files changed, 447 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-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 b9b969edeb09..d0becedaa4be 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/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 9d1312d073ee..5fba567726b3 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/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 7c5c98ac720d..7608acdaf1c1 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/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 38930f7860e1..7de7a2897bf7 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,5 +37,7 @@ 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/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 e1d7ce72855a..c7566c316dc0 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/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 213d941c58f6..75ba7a20876e 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/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 24ae3643b36e..5ac245db1386 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/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 32904531f1fc..985f2f1f86ba 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/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-telemetry/Dockerfile.j2 b/dockers/docker-sonic-telemetry/Dockerfile.j2 index 90bb1d574119..e1e8f50382ce 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/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 d9795f20f59d..dca9bb780ae8 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/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 d9d0d54ed518..1e5bc14d7075 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -512,7 +512,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 -%} @@ -526,6 +528,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 c12c36b1260b..d69ae4b275b1 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,5 +39,7 @@ 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/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 ae517eac08ef..872e26f4a61c 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/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 0e2bc4b6bbc7..4ede3b5fceca 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/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 f105b1221283..c13488abc1fd 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/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 f6c875bab1cc..b876aa14defa 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/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 27054e23e472..7195d88be2b2 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/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 5f5097f4b4aa..499b228e61e8 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/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 5f5097f4b4aa..499b228e61e8 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/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 5679fb38e338..183154ec5e08 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,5 +32,7 @@ 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/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 21aaef2f3009..533bce4b571d 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/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 967dad316967..7e15dd144fe0 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/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 316466dfb4ea..cdc85f604f21 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.version="$manifest" + ENTRYPOINT ["/usr/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 fea26b2f103e..df228a7c9db5 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/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 45abd73818af..f9858159767d 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 c389ecbd98b82b803319e47eb2b474dbd673b0d8 Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak Date: Mon, 16 Nov 2020 12:33:32 +0200 Subject: [PATCH 2/3] [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 f9858159767d..36dcdb7ff906 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 ca81090ebedb01619c1453533e6eac829c89d0bb Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak Date: Mon, 16 Nov 2020 22:31:51 +0200 Subject: [PATCH 3/3] remove swss dependency from dhcp-relay & router-advertiser Signed-off-by: Stepan Blyshchak --- dockers/docker-dhcp-relay/manifest.json.j2 | 1 - dockers/docker-router-advertiser/manifest.json.j2 | 1 - 2 files changed, 2 deletions(-) diff --git a/dockers/docker-dhcp-relay/manifest.json.j2 b/dockers/docker-dhcp-relay/manifest.json.j2 index bbce95399868..369103615e1c 100644 --- a/dockers/docker-dhcp-relay/manifest.json.j2 +++ b/dockers/docker-dhcp-relay/manifest.json.j2 @@ -5,7 +5,6 @@ "base-os-contraint": "^1.0.0", "depends": [ "database^1.0.0", - "swss^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..369103615e1c 100644 --- a/dockers/docker-router-advertiser/manifest.json.j2 +++ b/dockers/docker-router-advertiser/manifest.json.j2 @@ -5,7 +5,6 @@ "base-os-contraint": "^1.0.0", "depends": [ "database^1.0.0", - "swss^1.0.0" ], "name": "{{ package_name }}" },