Reduce docker images size. (#196)
* Reduce docker images size. Install only required dependencies. * Update Dockerfile.j2
This commit is contained in:
parent
6d4d54c984
commit
80d0d2d43b
@ -2,7 +2,11 @@ FROM docker-base
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
COPY debs/ debs
|
||||
COPY \
|
||||
{% for deb in docker_database_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
## Install redis-tools dependencies
|
||||
## TODO: implicitly install dependencies
|
||||
|
@ -4,7 +4,11 @@ RUN apt-get update
|
||||
|
||||
RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4
|
||||
|
||||
COPY debs/ debs
|
||||
COPY \
|
||||
{% for deb in docker_fpm_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
RUN dpkg -i \
|
||||
{% for deb in docker_fpm_debs.split(' ') -%}
|
||||
|
@ -1,6 +1,11 @@
|
||||
FROM docker-base
|
||||
|
||||
COPY debs /debs
|
||||
COPY \
|
||||
{% for deb in docker_lldp_sv2_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
COPY python-wheels /python-wheels
|
||||
|
||||
RUN apt-get update && apt-get install -y python-pip supervisor libbsd0 libevent-2.0-5 libjansson4 libwrap0 libxml2 libpci3 libperl5.20
|
||||
|
@ -8,7 +8,11 @@ RUN apt-get install -f -y ifupdown bridge-utils libdbus-1-3 libdaemon0 libjansso
|
||||
## TODO: implicitly install dependencies
|
||||
RUN apt-get -y install libjemalloc1
|
||||
|
||||
COPY debs /debs
|
||||
COPY \
|
||||
{% for deb in docker_orchagent_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
RUN dpkg -i \
|
||||
{% for deb in docker_orchagent_debs.split(' ') -%}
|
||||
|
@ -3,7 +3,11 @@ FROM debian:jessie
|
||||
MAINTAINER Pavel Shirshov
|
||||
|
||||
## Copy dependencies
|
||||
COPY debs /debs
|
||||
COPY \
|
||||
{% for deb in docker_ptf_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
## Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
@ -1,6 +1,11 @@
|
||||
FROM docker-base
|
||||
|
||||
COPY debs /debs
|
||||
COPY \
|
||||
{% for deb in docker_snmp_sv2_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
COPY python-wheels /python-wheels
|
||||
|
||||
# enable -O for all Python calls
|
||||
|
@ -2,7 +2,11 @@ FROM docker-base
|
||||
|
||||
RUN apt-get update && apt-get install -f -y libdbus-1-3 libdaemon0 libjansson4
|
||||
|
||||
COPY debs /debs
|
||||
COPY \
|
||||
{% for deb in docker_teamd_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
RUN dpkg -i \
|
||||
{% for deb in docker_teamd_debs.split(' ') -%}
|
||||
|
@ -2,7 +2,11 @@ FROM docker-base
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
COPY debs /debs
|
||||
COPY \
|
||||
{% for deb in docker_syncd_brcm_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
RUN dpkg -i \
|
||||
{% for deb in docker_syncd_brcm_debs.split(' ') -%}
|
||||
|
@ -2,7 +2,11 @@ FROM docker-base
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
COPY debs /debs
|
||||
COPY \
|
||||
{% for deb in docker_syncd_cavm_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
RUN apt-get -y install libpcap-dev libxml2-dev python-dev swig libsensors4-dev libjemalloc1
|
||||
|
||||
|
@ -2,7 +2,11 @@ FROM docker-base
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
COPY debs /debs
|
||||
COPY \
|
||||
{% for deb in docker_syncd_mlnx_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
RUN apt-get install -y libxml2
|
||||
|
||||
|
@ -4,7 +4,11 @@ RUN apt-get update
|
||||
|
||||
RUN apt-get install -y net-tools ethtool tcpdump ifupdown bridge-utils python-ply libqt5core5a libqt5network5 libboost-program-options1.55.0 libboost-system1.55.0 libboost-thread1.55.0 libgmp10 libjudydebian1 libnanomsg0 libdaemon0 libjansson4 libjemalloc1
|
||||
|
||||
COPY debs /debs
|
||||
COPY \
|
||||
{% for deb in docker_sonic_p4_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
{%- endfor -%}
|
||||
debs/
|
||||
|
||||
RUN dpkg -i \
|
||||
{% for deb in docker_sonic_p4_debs.split(' ') -%}
|
||||
|
Loading…
Reference in New Issue
Block a user