Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dockers] label SONiC Docker with manifest #12

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dockers/docker-database/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
13 changes: 13 additions & 0 deletions dockers/docker-database/manifest.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"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
}
}
4 changes: 4 additions & 0 deletions dockers/docker-dhcp-relay/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
16 changes: 16 additions & 0 deletions dockers/docker-dhcp-relay/manifest.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"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
}
}
4 changes: 4 additions & 0 deletions dockers/docker-fpm-frr/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
FROM docker-config-engine-buster

ARG docker_container_name
ARG manifest

ARG frr_user_uid
ARG frr_user_gid

Expand Down Expand Up @@ -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"]
21 changes: 21 additions & 0 deletions dockers/docker-fpm-frr/manifest.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"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
}
}
5 changes: 5 additions & 0 deletions dockers/docker-fpm-gobgp/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM docker-fpm-quagga

ARG docker_container_name
ARG manifest

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

Expand Down Expand Up @@ -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"]
21 changes: 21 additions & 0 deletions dockers/docker-fpm-gobgp/manifest.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"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
}
}
4 changes: 4 additions & 0 deletions dockers/docker-fpm-quagga/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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"]
21 changes: 21 additions & 0 deletions dockers/docker-fpm-quagga/manifest.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"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
}
}
4 changes: 4 additions & 0 deletions dockers/docker-iccpd/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
17 changes: 17 additions & 0 deletions dockers/docker-iccpd/manifest.json.j2
Original file line number Diff line number Diff line change
@@ -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": false,
"host-service": true
}
}
4 changes: 4 additions & 0 deletions dockers/docker-lldp/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
17 changes: 17 additions & 0 deletions dockers/docker-lldp/manifest.json.j2
Original file line number Diff line number Diff line change
@@ -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": true
}
}
4 changes: 4 additions & 0 deletions dockers/docker-nat/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]

17 changes: 17 additions & 0 deletions dockers/docker-nat/manifest.json.j2
Original file line number Diff line number Diff line change
@@ -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": false,
"host-service": true
}
}
4 changes: 4 additions & 0 deletions dockers/docker-orchagent/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
17 changes: 17 additions & 0 deletions dockers/docker-orchagent/manifest.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"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
}
}
4 changes: 4 additions & 0 deletions dockers/docker-platform-monitor/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
16 changes: 16 additions & 0 deletions dockers/docker-platform-monitor/manifest.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"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
}
}
4 changes: 4 additions & 0 deletions dockers/docker-router-advertiser/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
16 changes: 16 additions & 0 deletions dockers/docker-router-advertiser/manifest.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"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
}
}
4 changes: 4 additions & 0 deletions dockers/docker-sflow/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
Loading