ba02209141
* First cut image update for kubernetes support. With this, 1) dockers dhcp_relay, lldp, pmon, radv, snmp, telemetry are enabled for kube management init_cfg.json configure set_owner as kube for these 2) Each docker's start.sh updated to call container_startup.py to register going up As part of this call, it registers the current owner as local/kube and its version The images are built with its version ingrained into image during build 3) Update all docker's bash script to call 'container start/stop/wait' instead of 'docker start/stop/wait'. For all locally managed containers, it calls docker commands, hence no change for locally managed. 4) Introduced a new ctrmgrd service, that helps with transition between owners as kube & local and carry over any labels update from STATE-DB to API server 5) hostcfgd updated to handle owner change 6) Reboot scripts are updatd to tag kube running images as local, so upon reboot they run the same image. 7) Added kube_commands.py to handle all updates with Kubernetes API serrver -- dedicated for k8s interaction only.
37 lines
1.2 KiB
Django/Jinja
37 lines
1.2 KiB
Django/Jinja
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
|
FROM docker-config-engine-buster
|
|
|
|
ARG docker_container_name
|
|
ARG image_version
|
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
|
|
|
# Make apt-get non-interactive
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Pass the image_version to container
|
|
ENV IMAGE_VERSION=$image_version
|
|
|
|
# Update apt's cache of available packages
|
|
RUN apt-get update
|
|
|
|
{% if docker_dhcp_relay_debs.strip() -%}
|
|
# Copy built Debian packages
|
|
{{ copy_files("debs/", docker_dhcp_relay_debs.split(' '), "/debs/") }}
|
|
|
|
# Install built Debian packages and implicitly install their dependencies
|
|
{{ install_debian_packages(docker_dhcp_relay_debs.split(' ')) }}
|
|
{%- endif %}
|
|
|
|
# Clean up
|
|
RUN apt-get clean -y && \
|
|
apt-get autoclean -y && \
|
|
apt-get autoremove -y && \
|
|
rm -rf /debs
|
|
|
|
COPY ["docker_init.sh", "start.sh", "/usr/bin/"]
|
|
COPY ["docker-dhcp-relay.supervisord.conf.j2", "port-name-alias-map.txt.j2", "wait_for_intf.sh.j2", "/usr/share/sonic/templates/"]
|
|
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
|
|
COPY ["critical_processes", "/etc/supervisor"]
|
|
|
|
ENTRYPOINT ["/usr/bin/docker_init.sh"]
|