Skip to content

Commit 37397c0

Browse files
Fix: Suppress dpkg warnings in Docker build
1 parent 6cffddb commit 37397c0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ ARG TARGETARCH
2727
ENV GOPATH=/gopath/
2828
ENV PATH=$GOPATH/bin:$PATH
2929

30+
# Prevent various dpkg warnings about missing files, such as man pages.
31+
RUN echo "path-exclude /usr/share/doc/*" > /etc/dpkg/dpkg.cfg.d/01_nodoc && \
32+
echo "path-exclude /usr/share/man/*" >> /etc/dpkg/dpkg.cfg.d/01_nodoc && \
33+
echo "path-exclude /usr/share/groff/*" >> /etc/dpkg/dpkg.cfg.d/01_nodoc && \
34+
echo "path-exclude /usr/share/info/*" >> /etc/dpkg/dpkg.cfg.d/01_nodoc && \
35+
echo "path-exclude /usr/share/lintian/*" >> /etc/dpkg/dpkg.cfg.d/01_nodoc && \
36+
echo "path-exclude /usr/share/linda/*" >> /etc/dpkg/dpkg.cfg.d/01_nodoc
3037
RUN apt-get update --fix-missing && apt-get --yes install libsystemd-dev gcc-aarch64-linux-gnu
3138
RUN go version
3239

@@ -38,6 +45,13 @@ FROM registry.k8s.io/build-image/debian-base:bookworm-v1.0.5@sha256:dd9c1f36c33b
3845

3946
LABEL maintainer="Random Liu <[email protected]>"
4047

48+
# Prevent various dpkg warnings about missing files, such as man pages.
49+
RUN echo "path-exclude /usr/share/doc/*" > /etc/dpkg/dpkg.cfg.d/01_nodoc && \
50+
echo "path-exclude /usr/share/man/*" >> /etc/dpkg/dpkg.cfg.d/01_nodoc && \
51+
echo "path-exclude /usr/share/groff/*" >> /etc/dpkg/dpkg.cfg.d/01_nodoc && \
52+
echo "path-exclude /usr/share/info/*" >> /etc/dpkg/dpkg.cfg.d/01_nodoc && \
53+
echo "path-exclude /usr/share/lintian/*" >> /etc/dpkg/dpkg.cfg.d/01_nodoc && \
54+
echo "path-exclude /usr/share/linda/*" >> /etc/dpkg/dpkg.cfg.d/01_nodoc
4155
RUN clean-install util-linux bash libsystemd-dev
4256

4357
# Avoid symlink of /etc/localtime.

0 commit comments

Comments
 (0)