Skip to content

Commit bac5722

Browse files
serhepopovychlguohan
authored andcommitted
[docker-fpm-frr]: Fix build with frr used for routing stack (#1728)
After commit 832be7b ("[dockers] Prevent apt-get from installing suggested and recommended packages by default (#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 <sergey.popovich@ordnance.co>
1 parent a2a6aea commit bac5722

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

dockers/docker-fpm-frr/Dockerfile.j2

+17-12
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
FROM docker-config-engine
22

3-
## Make apt-get non-interactive
3+
# Make apt-get non-interactive
44
ENV DEBIAN_FRONTEND=noninteractive
55

6+
# Update apt's cache of available packages
67
RUN apt-get update
78

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

10-
COPY \
11-
{% for deb in docker_fpm_frr_debs.split(' ') -%}
12-
debs/{{ deb }}{{' '}}
13-
{%- endfor -%}
14-
debs/
12+
{% if docker_fpm_frr_debs.strip() -%}
13+
# Copy locally-built Debian package dependencies
14+
{%- for deb in docker_fpm_frr_debs.split(' ') %}
15+
COPY debs/{{ deb }} /debs/
16+
{%- endfor %}
1517

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

21-
## Clean up
22-
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
23-
RUN rm -rf /debs
24+
# Clean up
25+
RUN apt-get clean -y
26+
RUN apt-get autoclean -y
27+
RUN apt-get autoremove -y
28+
RUN rm -rf /debs ~/.cache
2429

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

0 commit comments

Comments
 (0)