Commit e0b174f67e for frr
commit e0b174f67ee8de69d0a3fe879d24180a42e64470
Author: Peter Benis <benispeti@gmail.com>
Date: Fri Sep 11 14:08:57 2026 +0200
docker: make default Alpine image exclude dev packages
Signed-off-by: Peter Benis <benispeti@gmail.com>
diff --git a/.dockerignore b/.dockerignore
index e6e1310d24..539e4d203f 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -7,3 +7,4 @@
**/.libs
docker/alpine/pkgs
docker/centos/pkgs
+docker/**/Dockerfile
diff --git a/doc/developer/building-docker.rst b/doc/developer/building-docker.rst
index 644e02bd6c..7b6c5a8f3b 100644
--- a/doc/developer/building-docker.rst
+++ b/doc/developer/building-docker.rst
@@ -12,6 +12,10 @@ source-built FRR on the following base platforms:
* Centos 7
* Centos 8
+The Alpine image is a minimal runtime image that excludes development
+(``-dev``), documentation (``-doc``), and debug (``-dbg``) packages, which
+are only needed at build time.
+
The following platform images are used to support Travis CI and can also
be used to reproduce topotest failures when the docker host is Ubuntu
(tested on 20.04 and 22.04):
diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile
index 4d42159620..5010f218dc 100644
--- a/docker/alpine/Dockerfile
+++ b/docker/alpine/Dockerfile
@@ -1,4 +1,4 @@
-# syntax=docker/dockerfile:1
+# syntax=docker/dockerfile:1.19
# Create a basic stage set up to build APKs
FROM alpine:3.22 as alpine-builder
@@ -64,10 +64,11 @@ RUN cd /dist \
&& git init \
&& abuild -P /pkgs/apk
-# This stage installs frr from the apk
+# This stage installs frr from the apk. No dev, doc or dbg packages included.
FROM alpine:3.22
RUN mkdir -p /pkgs/apk
-COPY --from=alpine-apk-builder /pkgs/apk/ /pkgs/apk/
+COPY --exclude=**/*-dev-*.apk --exclude=**/*-doc-*.apk --exclude=**/*-dbg-*.apk \
+ --from=alpine-apk-builder /pkgs/apk/ /pkgs/apk/
RUN apk add \
--no-cache \
--update-cache \