docker: Install the apk packages regardless of the platform

It was hardcoded to x86_64, but we build Alpine images for more platforms, let's
be dynamical here.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
Donatas Abraitis 2023-07-31 11:05:15 +03:00
parent 617b450d01
commit 18becdc29e

View file

@ -28,7 +28,7 @@ FROM alpine:3.18 as source-builder
RUN mkdir -p /src/alpine /pkgs/apk
COPY alpine/APKBUILD.in /src/alpine
COPY --from=alpine-apk-builder-libyang /pkgs/apk/src /pkgs/apk
RUN cd /pkgs/apk/x86_64 && apk add --allow-untrusted *.apk
RUN cd /pkgs/apk && apk add --allow-untrusted */*.apk
RUN source /src/alpine/APKBUILD.in \
&& apk add \
--no-cache \
@ -48,7 +48,7 @@ RUN cd /src \
FROM alpine-builder as alpine-apk-builder
COPY --from=source-builder /src/frr-*.tar.gz /src/alpine/* /dist/
COPY --from=alpine-apk-builder-libyang /pkgs/apk/src /pkgs/apk
RUN cd /pkgs/apk/x86_64 && apk add --allow-untrusted *.apk
RUN cd /pkgs/apk && apk add --allow-untrusted */*.apk
RUN find /pkgs/apk -type f -name APKINDEX.tar.gz -delete
RUN chown -R builder /dist /pkgs
USER builder