Unminimize command missing from nginx, debian images?

I want to unminimize an image to install some tools (include manpages). All hits on the web say I need to run /usr/local/sbin/unminimize, but that file doesn’t exist (I searched the entire filesystem).

Searching here for unminimze turns up only two unrelated topics.

Installed apt-file and did

root@37371a1be27e:/# apt-file search unminimize
herbstluftwm: /usr/share/doc/herbstluftwm/examples/unminimize.sh
libgtk-4-doc: /usr/share/doc/libgtk-4-doc/gtk4/method.Window.unminimize.html

Also

root@a7f4f8f698c6:/# dpkg -l man\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-===========================================
un  man            <none>       <none>       (no description available)
un  man-browser    <none>       <none>       (no description available)
ii  man-db         2.11.2-2     amd64        tools for reading manual pages
ii  manpages       6.03-2       all          Manual pages about using a GNU/Linux system
un  manpages-dev   <none>       <none>       (no description available)



root@a7f4f8f698c6:/# mandb
Purging old database entries in /usr/share/man...
Processing manual pages under /usr/share/man...
Checking for stray cats under /usr/share/man...
Checking for stray cats under /var/cache/man...
Processing manual pages under /usr/local/man...
0 man subdirectories contained newer manual pages.
0 manual pages were added.
0 stray cats were added.
0 old database entries were purged.


root@a7f4f8f698c6:/# dpkg -L manpages
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/manpages
/usr/share/doc/manpages/Changes.old.gz
/usr/share/doc/manpages/POSIX-MANPAGES
/usr/share/doc/manpages/TODO.Debian
/usr/share/doc/manpages/changelog.Debian.gz
/usr/share/doc/manpages/changelog.gz
/usr/share/doc/manpages/copyright
/usr/share/doc/manpages/man-addons.el
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/manpages
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/getent.1.gz
/usr/share/man/man1/iconv.1.gz
/usr/share/man/man1/intro.1.gz
/usr/share/man/man1/ldd.1.gz
/usr/share/man/man1/locale.1.gz
/usr/share/man/man1/localedef.1.gz
/usr/share/man/man1/memusage.1.gz
/usr/share/man/man1/memusagestat.1.gz
[snip]

root@a7f4f8f698c6:/# ls /usr/share/man/man1
root@a7f4f8f698c6:/#

Suggestions?

Same here using the Ubuntu 24.04 image. The unminimize line in my Dockerfile has been working fine for years and I hit this error for the first time today. I haven’t done much investigation yet, but I suspect it’s because of a recent change.

When working with containers, you should not rely on commands like that. You should always install that you know you need. I even use apt-get install -y --no-install-recommends in a Dockerfile as I don’t want any recommended package to be installed. I want to install what I know I need.

It looks like the command was removed from the cloud images that Docker uses too. So it was not done by Docker

For example this is used for Ubuntu images: cloud-images/+oci/ubuntu-base - [no description]

But I don’t know about NginX. I could not find that command in nginx:1.12 either.

This is currently the top search result for missing unminimize, but unminimize seems to be ubuntu-specific. If you’re here for that and missing unminimize on an ubuntu variant rather than debian, apt install unminimize. From ubuntu noble 24.04 onwards it’s been moved from the base image to a separate package.

On Debian, it seems there never has been an unminimize command. Instead, debian publishes two tags for each base image, one of which ending in -slim, like for example trixie and trixie-slim. The non-slim debian doesn’t need to be unminimized and apt install man-db just works.

Unfortunately for OP, the nginx image is based on bookworm-slim. The slim version uses a file called /etc/dpkg/dpkg.cfg.d/docker to prevent manpages being installed.

Although no built-in script is included, you can manually un-slim a Debian-based image in much the same way ubuntu’s unminimize script works: delete the dpkg.cfg.d dropin and reinstall the affected packages.

rm /etc/dpkg/dpkg.cfg.d/docker
dpkg --verify --verify-format rpm \
  | awk '$1=="missing"{print $2}' \
  | xargs --no-run-if-empty -n 120 dpkg -S \
  | grep -v diversion \
  | cut -d: -f1 \
  | tr ',' '\n' \
  | awk '{print $1}' \
  | sort -u \
  | DEBIAN_FRONTEND=noninteractive xargs -n 120 apt install --reinstall -y man-db

This logic is based on the unminimize source code, but shortened for brevity.

Thanks for the detailed information. I was able to find the Ubuntu script in GitHub a couple of weeks ago, and adapted it for my particular situation.