•
DIR/README
Build a docker image with given debian packages
deb2docker [-hB]
[-c
CMD]
[-f
FROM]
[-n
NAME]
[-o
DIR]
[-p
PRE_SCRIPT]
[-s
POST_SCRIPT]
packages
deb2docker is a simple script which takes as input a list of Debian packages and generates automatically a Docker container including these packages. A set of freedesktop.org desktop launchers are also generated based on the .desktop and icon files found in the packages. In addition, a desktop launcher is created to start the container in a Terminal.
This tool is suited for deploying applications as containers, as well as for testing Debian packages in a sandbox.
-B
do NOT build the image (default is to build). A build script is generated in the DIR target directory.
-c EXEC
Command to run in the container (default to /bin/bash).
-f FROM
Distribution is to be used (default to debian:stable).
-h
Show this help
-n NAME
Name of the image (default is built from the package list).
-o DIR
Use given directory DIR for the build (default is in /tmp).
-p PRE_SCRIPT
Execute the given script PRE_SCRIPT before packages install.
-s POST_SCRIPT
Execute the given script POST_SCRIPT after packages install.
packagesThe package list can be any Debian package, as well as local .deb files.
•
DIR/README
•
DIR/Dockerfile
•
DIR/launchers/
•
DIR/icons/
•
DIR/build
•
DIR/start
sudo apt install docker.io
sudo usermod -aG docker $USER`
You may have to manually configure Docker to pass a proxy configuration.
Usual commands typically used to handle Docker containers are:
builddocker build –rm Dockerfile run docker run –rm -it NAME clean docker rmi NAME clean ALL docker system prune -a
deb2docker -o /tmp/xeyes x11-apps
/tmp/xeyes/start xeyes
A Desktop launcher is created as /tmp/xeyes/launchers/x11-apps-terminal.desktop
deb2docker x11-apps meshlab
echo “sed -i `s/main/main contrib non-free/g' /etc/apt/sources.list” > pre.sh
deb2docker -p pre.sh x11-apps