DEB2DOCKER(1)
๐ DEB2DOCKER โ bestie edition ๐
okay so you found deb2docker(1) and you're like "what is this" โ let me hold your hand through it, no cap.
โจ NAME โจ
deb2docker โ build a Docker image with the Debian packages you tell it to ๐ณ๐
๐ธ SYNOPSIS ๐ธ
deb2docker [-hB][-c CMD][-f FROM][-n NAME][-o DIR][-p PRE_SCRIPT][-s
POST_SCRIPT] packages
๐ฆ DESCRIPTION ๐ฆ
So deb2docker is literally a little script that takes a list of Debian packages as input and automatically generates a Docker container with those packages inside it. Iconic behaviour fr fr. ๐ซถ
It also generates a whole set of freedesktop.org desktop launchers for you, based on the .desktop and icon files it finds in the packages. And on top of that, it makes a desktop launcher that starts the container in a Terminal. The way it just... does all that. ๐ญโจ
This tool is giving two vibes at once: it's suited for deploying applications as containers, and also for testing Debian packages in a sandbox. Main character energy either way. ๐
๐ OPTIONS ๐
-Bโ do NOT build the image (default is to build, bestie). A build script gets generated in theDIRtarget directory instead. ๐-c EXECโ the command to run in the container (defaults to/bin/bash). โจ-f FROMโ which distribution is to be used (defaults todebian:stable). ๐-hโ show this help. simple as that, queen. ๐-n NAMEโ name of the image (default is built from the package list). ๐-o DIRโ use the given directoryDIRfor the build (default is in/tmp). ๐-p PRE_SCRIPTโ execute the given scriptPRE_SCRIPTbefore packages install. โฎ๏ธ-s POST_SCRIPTโ execute the given scriptPOST_SCRIPTafter packages install. โญ๏ธpackagesโ the package list can be any Debian package, as well as local.debfiles. yes you read that right, local files too. ๐๐
๐ FILES ๐
here's everything it drops for you, no gatekeeping:
DIR/READMEDIR/DockerfileDIR/launchers/DIR/icons/DIR/buildDIR/start
๐ง NOTES ๐ง
okay so obviously you need Docker installed, and you need to be part of the docker group. not optional, bestie. ๐
sudo apt install docker.io- `sudo usermod -aG docker $USER``
โ ๏ธ heads up: you may have to manually configure Docker to pass a proxy configuration. don't come for me, that's just how it is. ๐
And these are the usual commands people typically use to handle Docker containers:
build docker build โrm Dockerfile
run docker run โrm -it NAME
clean docker rmi NAME
clean ALL docker system prune -a
(i put the little labels next to them so it reads like the original, but the commands are exactly as written, promise ๐ค)
๐ฅ EXAMPLES ๐ฅ
Example one: create a Docker container with package x11-apps in directory /tmp/xeyes, and launch xeyes:
deb2docker -o /tmp/xeyes x11-apps/tmp/xeyes/start xeyes
A Desktop launcher is created as /tmp/xeyes/launchers/x11-apps-terminal.desktop โจ
Example two: create a Docker container with x11-apps and meshlab:
deb2docker x11-apps meshlab
Example three: create a Docker container making sure software channels are active:
- first write your pre script:
echo โsed -i `s/main/main contrib non-free/g' /etc/apt/sources.listโ > pre.sh
- then run it:
deb2docker -p pre.sh x11-apps
๐ AUTHORS ๐
Emmanuel Farhi (emmanuel.farhi@synchrotron-soleil.fr) โ shoutout to the legend who made this. ๐ซก๐
๐ SEE ALSO ๐
go read these next, bestie, they're all connected:
deb2apptainer(1), distrobox-create(1), distrobox-enter(1), docker(1), apptainer(1)
๐ AUTHORS (yes, again) ๐
Emmanuel Farhi.
and that's the whole page, babe โ this was DEB2DOCKER(1), the February 2024 edition ๐ slay, you read the entire manual, go build something cute with it โจ๐๐ฆ
๐ฆ where this page comes from
- debian trixie: devscripts 2.25.15+deb13u1 ยท GPL-2.0-or-later
- epel 10: devscripts 2.25.5-1.el10_1 ยท GPL-2.0-or-later
- epel 9: devscripts 2.25.5-1.el9 ยท GPL-2.0-or-later
- fedora 43: devscripts 2.25.19-2.fc43 ยท GPL-2.0-or-later
- fedora 43: devscripts 2.25.33-1.fc43 ยท GPL-2.0-or-later
- fedora 44: devscripts 2.26.5-1.fc44 ยท GPL-2.0-or-later
- ubuntu questing: devscripts 2.25.19ubuntu2
- ubuntu resolute: devscripts 2.26.7 ยท GPL-2.0-or-later
- ubuntu stonking: devscripts 2.26.11ubuntu1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms