Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c350411acc |
+8
-15
@@ -138,24 +138,17 @@ RUN mkdir /etc/sysusers.d \
|
||||
# package lists, so no CA certificates are needed.
|
||||
#
|
||||
# The image's dpkg config drops man pages as each package unpacks, so
|
||||
# xz-utils' install, which nix-bin depends on, prints an update-alternatives
|
||||
# warning for every man-page link it cannot make. This side file re-includes
|
||||
# them for this install alone; it is read after /etc/dpkg/dpkg.cfg.d/excludes,
|
||||
# so it overrides the drop and the links are made quietly. The cleanup below
|
||||
# removes the man pages and the links and directories they added, then puts
|
||||
# the base image's empty man directories back. The image holds exactly what
|
||||
# it held before, and installs built from it still drop man pages.
|
||||
RUN find /usr/share/man -mindepth 1 -type d > /tmp/base-man-dirs \
|
||||
&& echo 'path-include=/usr/share/man/*' > /etc/dpkg/dpkg.cfg.d/z-man \
|
||||
# xz-utils' install prints an update-alternatives warning for every man-page
|
||||
# link it cannot make. This side file re-includes them for this install
|
||||
# alone; it is named to be read after /etc/dpkg/dpkg.cfg.d/excludes, so it
|
||||
# overrides that drop. The man pages and the side file are removed again
|
||||
# below, so the image keeps no man pages, and installs built from it still
|
||||
# drop them.
|
||||
RUN echo 'path-include=/usr/share/man/*' > /etc/dpkg/dpkg.cfg.d/z-man \
|
||||
&& apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \
|
||||
ca-certificates nix-bin runit \
|
||||
&& rm -rf /var/lib/apt/lists/* /etc/dpkg/dpkg.cfg.d/z-man \
|
||||
&& find /usr/share/man ! -type d -delete \
|
||||
&& find /etc/alternatives -type l -xtype l -delete \
|
||||
&& find /usr/share/man -mindepth 1 -type d -empty -delete \
|
||||
&& xargs -a /tmp/base-man-dirs mkdir -p \
|
||||
&& rm /tmp/base-man-dirs
|
||||
&& rm -rf /var/lib/apt/lists/* /usr/share/man /etc/dpkg/dpkg.cfg.d/z-man
|
||||
|
||||
# Nix run by root expects a group of build users, which nix-bin does not
|
||||
# create; with the setting empty, root's builds run without them.
|
||||
|
||||
Reference in new issue
Block a user