Repository navigation
Conversation
The GTK build of mtr pulled GTK3, the Adwaita icon theme and the X/cairo/pango stack into a headless image. mtr-tiny ships the same mtr binary without them. A dpkg path-exclude file keeps /usr/share/doc (except copyright files) and /usr/share/locale out of every package installed after it, in both Dockerfiles. Man pages are still installed. Measured on arm64: slim 730 MB -> 562 MB from this change alone; base 1.17 GB -> 930 MB together with the wormhole-rs switch. Smoke tests now fail if GTK or package docs come back.
The Python magic-wormhole dragged in Twisted and its dependency tree. wormhole-rs (packaged in trixie) speaks the same protocol, so it interoperates with any other wormhole client. A /usr/local/bin/wormhole link keeps the usual command name for send and receive.
The docker variant ships the CLI only. install-dockerd installs docker-ce and containerd.io from the Docker apt repository already configured in the image; --start launches dockerd and waits for it to answer. Running the engine needs a privileged container. Shellcheck now covers tools/*.sh instead of listing transfer.sh alone.
Interactive zsh sessions on a terminal print the fragments in /etc/netshoot/motd.d: a few example commands, then notes specific to the variant (how to reach the host engine, install-dockerd, --privileged needs). It prints before the Powerlevel10k instant prompt, once per docker run or docker exec: an exported guard keeps nested shells, tmux panes and omz reload quiet. NETSHOOT_NO_MOTD=1 hides it.
The slim variant of the Debian image leaves docs, man pages and translations out of the base layer. The man page guard now matches its space-separated path-exclude rule too (dpkg accepts both forms), so every package installed on top still gets its pages; only the base layer's own packages (bash, coreutils...) lose theirs. Measured on arm64: base 930 MB -> 880 MB, docker 1.08 GB -> 1.03 GB, slim 562 MB -> 507 MB.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The images carried a lot of weight nobody uses in a debug container. This cuts about 290 MB from the full images and 220 MB from slim, and adds two small things on top: an on-demand Docker engine and a message of the day.
Size
Local arm64 builds of
mainand of this branch.mtrwas the GTK build, so it pulled GTK3, the Adwaita icon theme and the whole X/cairo/pango stack into a headless image.mtr-tinyships the samemtrbinary without any of it.debian:trixie-slim, which already leaves docs, man pages and translations out of its own layer (about 50 MB). The man page guard had to learn its space-separatedpath-exclude /usr/share/man/*form, otherwisemanwould have been empty. Pages for bash, coreutils and the rest of the base layer are gone, everything we install keeps them.configs/dpkg-excludeskeeps/usr/share/docand/usr/share/localeout of every package we install. Copyright files and man pages stay.magic-wormhole(Python plus Twisted) is replaced bywormhole-rsfrom trixie. Same protocol, so it still talks to any other wormhole client, andwormholekeeps working through a link. Onlysendandreceiveare guaranteed to look the same: anyone scripting the Python CLI flags may need to adjust. I did not mark it as breaking for that reason, open to discussion.install-dockerd
The docker variant is CLI only.
install-dockerdinstallsdocker-ceandcontainerd.iofrom the Docker repo already configured in the image, and--startlaunches dockerd and waits until it answers. It needs--privileged, obviously.Message of the day
Every variant now prints a short message when an interactive zsh starts on a terminal: a few example commands, then notes for that variant (host socket,
install-dockerd,--privileged). It is printed before the p10k instant prompt, once perdocker runordocker exec. An exported guard keeps nested shells, tmux panes andomz reloadquiet.-e NETSHOOT_NO_MOTD=1hides it.Tests
tests/smoke.shpasses locally on base (110), slim (60) and docker (117). The new checks (no GTK, no docs,wormhole-rs, MOTD shown once, hidden by the env var, absent without a tty,install-dockerd) fail onmain, as they should. I did not build podman, nerdctl or containerd locally, and the intermediate commits were not built one by one, so CI gets the last word there.