From 60b16495cce3ea64bc436e1f7a875955281e9b97 Mon Sep 17 00:00:00 2001 From: lguohan Date: Sun, 5 Apr 2020 13:29:34 -0700 Subject: [PATCH] [docker-base-stretch]: move common packages into docker-base-stretch (#4371) libpython2.7, libdaemon0, libdbus-1-3, libjansson4 are common across different containers. move them into docker-base-stretch Signed-off-by: Guohan Lu --- dockers/docker-base-stretch/Dockerfile.j2 | 7 ++++++- dockers/docker-fpm-frr/Dockerfile.j2 | 4 ---- dockers/docker-iccpd/Dockerfile.j2 | 16 ++-------------- dockers/docker-nat/Dockerfile.j2 | 9 --------- dockers/docker-orchagent/Dockerfile.j2 | 4 ---- dockers/docker-platform-monitor/Dockerfile.j2 | 1 - dockers/docker-sonic-telemetry/Dockerfile.j2 | 6 +----- dockers/docker-teamd/Dockerfile.j2 | 7 +------ platform/vs/docker-sonic-vs/Dockerfile.j2 | 8 -------- 9 files changed, 10 insertions(+), 52 deletions(-) diff --git a/dockers/docker-base-stretch/Dockerfile.j2 b/dockers/docker-base-stretch/Dockerfile.j2 index 65b7f9d537ce..17047d13a839 100644 --- a/dockers/docker-base-stretch/Dockerfile.j2 +++ b/dockers/docker-base-stretch/Dockerfile.j2 @@ -54,7 +54,12 @@ RUN apt-get update && \ libjemalloc1 \ liblua5.1-0 \ lua-bitop \ - lua-cjson + lua-cjson \ +# common dependencies + libpython2.7 \ + libdaemon0 \ + libdbus-1-3 \ + libjansson4 # ip and ifconfig utility missing in docker for arm arch RUN apt-get -y install \ diff --git a/dockers/docker-fpm-frr/Dockerfile.j2 b/dockers/docker-fpm-frr/Dockerfile.j2 index 1c670682a342..c382df3c2ba3 100644 --- a/dockers/docker-fpm-frr/Dockerfile.j2 +++ b/dockers/docker-fpm-frr/Dockerfile.j2 @@ -14,12 +14,8 @@ ENV DEBIAN_FRONTEND=noninteractive # Install required packages RUN apt-get update && \ apt-get install -y \ - libdbus-1-3 \ - libdaemon0 \ - libjansson4 \ libc-ares2 \ iproute2 \ - libpython2.7 \ libjson-c3 \ logrotate \ libunwind8 diff --git a/dockers/docker-iccpd/Dockerfile.j2 b/dockers/docker-iccpd/Dockerfile.j2 index ce3969f29da5..3c7e01ed54e9 100644 --- a/dockers/docker-iccpd/Dockerfile.j2 +++ b/dockers/docker-iccpd/Dockerfile.j2 @@ -7,20 +7,8 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && \ - apt-get install -f -y \ - libdbus-1-3 \ - libdaemon0 \ - libpython2.7 \ - # Install redis-tools dependencies - # TODO: implicitly install dependencies - libatomic1 \ - libjemalloc1 \ - liblua5.1-0 \ - lua-bitop \ - lua-cjson - -RUN apt-get -y install ebtables +RUN apt-get update && \ + apt-get install -y ebtables RUN apt-get -y install -f kmod COPY \ diff --git a/dockers/docker-nat/Dockerfile.j2 b/dockers/docker-nat/Dockerfile.j2 index a74147cc26fd..30f4cd1c0cb8 100644 --- a/dockers/docker-nat/Dockerfile.j2 +++ b/dockers/docker-nat/Dockerfile.j2 @@ -13,15 +13,6 @@ ENV DEBIAN_FRONTEND=noninteractive ## TODO: implicitly install dependencies RUN apt-get update \ && apt-get install -f -y \ - libdbus-1-3 \ - libdaemon0 \ - libjansson4 \ - libpython2.7 \ - libatomic1 \ - libjemalloc1 \ - liblua5.1-0 \ - lua-bitop \ - lua-cjson \ libelf1 \ libmnl0 \ bridge-utils \ diff --git a/dockers/docker-orchagent/Dockerfile.j2 b/dockers/docker-orchagent/Dockerfile.j2 index f95acd48fdbd..43c9d5896f34 100755 --- a/dockers/docker-orchagent/Dockerfile.j2 +++ b/dockers/docker-orchagent/Dockerfile.j2 @@ -11,10 +11,6 @@ RUN apt-get update && \ apt-get install -f -y \ ifupdown \ arping \ - libdbus-1-3 \ - libdaemon0 \ - libjansson4 \ - libpython2.7 \ iproute2 \ ndisc6 \ tcpdump \ diff --git a/dockers/docker-platform-monitor/Dockerfile.j2 b/dockers/docker-platform-monitor/Dockerfile.j2 index fd11f628559c..4f5f2b77141b 100755 --- a/dockers/docker-platform-monitor/Dockerfile.j2 +++ b/dockers/docker-platform-monitor/Dockerfile.j2 @@ -11,7 +11,6 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ apt-get install -y \ python-pip \ - libpython2.7 \ ipmitool \ librrd8 \ librrd-dev \ diff --git a/dockers/docker-sonic-telemetry/Dockerfile.j2 b/dockers/docker-sonic-telemetry/Dockerfile.j2 index e94441b4f066..cbc8a1e916fa 100644 --- a/dockers/docker-sonic-telemetry/Dockerfile.j2 +++ b/dockers/docker-sonic-telemetry/Dockerfile.j2 @@ -7,11 +7,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && \ - apt-get install -f -y \ - libdbus-1-3 \ - libdaemon0 \ - libjansson4 +RUN apt-get update {% if docker_sonic_telemetry_debs.strip() -%} # Copy locally-built Debian package dependencies diff --git a/dockers/docker-teamd/Dockerfile.j2 b/dockers/docker-teamd/Dockerfile.j2 index 4282a10d0c86..704f3c2ebbda 100644 --- a/dockers/docker-teamd/Dockerfile.j2 +++ b/dockers/docker-teamd/Dockerfile.j2 @@ -7,12 +7,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && \ - apt-get install -f -y \ - libdbus-1-3 \ - libdaemon0 \ - libjansson4 \ - libpython2.7 +RUN apt-get update {% if docker_teamd_debs.strip() -%} # Copy locally-built Debian package dependencies diff --git a/platform/vs/docker-sonic-vs/Dockerfile.j2 b/platform/vs/docker-sonic-vs/Dockerfile.j2 index ee3858aca647..f7c88c9b833a 100644 --- a/platform/vs/docker-sonic-vs/Dockerfile.j2 +++ b/platform/vs/docker-sonic-vs/Dockerfile.j2 @@ -27,18 +27,10 @@ RUN apt-get install -y net-tools \ libboost-thread1.62.0 \ libgmp10 \ libjudydebian1 \ - libdaemon0 \ - libjansson4 \ - libatomic1 \ - libjemalloc1 \ - liblua5.1-0 \ - lua-bitop \ - lua-cjson \ openssh-client \ openssh-server \ libc-ares2 \ iproute \ - libpython2.7 \ grub2-common \ python-click-default-group \ python-click \