Skip to content

Commit

Permalink
[docker-fpm-frr]: Fix build with frr used for routing stack (sonic-ne…
Browse files Browse the repository at this point in the history
…t#1728)

After commit 832be7b ("[dockers] Prevent apt-get from installing
suggested and recommended packages by default (sonic-net#1666)") SONiC fails
to build when FRR is used for routing stack (e.g. SONIC_ROUTING_STACK
is set to frr in rules/config).

To fix issue just replicate changes from docker-fpm-quagga to
docker-fpm-frr to make dependencies installed correctly after above
change to package installing behaviour.

Signed-off-by: Sergey Popovich <[email protected]>
  • Loading branch information
serhepopovych authored and lguohan committed Jun 23, 2018
1 parent a2a6aea commit bac5722
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions dockers/docker-fpm-frr/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
FROM docker-config-engine

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

# Update apt's cache of available packages
RUN apt-get update

# Install required packages
RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4 libc-ares2 iproute

COPY \
{% for deb in docker_fpm_frr_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/
{% if docker_fpm_frr_debs.strip() -%}
# Copy locally-built Debian package dependencies
{%- for deb in docker_fpm_frr_debs.split(' ') %}
COPY debs/{{ deb }} /debs/
{%- endfor %}

RUN dpkg -i \
{% for deb in docker_fpm_frr_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
# Install locally-built Debian packages and implicitly install their dependencies
{%- for deb in docker_fpm_frr_debs.split(' ') %}
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; dpkg_apt /debs/{{ deb }}
{%- endfor %}
{%- endif %}

## Clean up
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
RUN rm -rf /debs
# Clean up
RUN apt-get clean -y
RUN apt-get autoclean -y
RUN apt-get autoremove -y
RUN rm -rf /debs ~/.cache

COPY ["*.j2", "/usr/share/sonic/templates/"]
COPY ["start.sh", "config.sh", "/usr/bin/"]
Expand Down

0 comments on commit bac5722

Please sign in to comment.