File: deb2docker.1

package info (click to toggle)
devscripts 2.25.15
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 8,528 kB
  • sloc: perl: 26,530; sh: 11,698; python: 4,428; makefile: 363
file content (111 lines) | stat: -rw-r--r-- 3,061 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
.TH "DEB2DOCKER" "1" "February 2024" "" ""
.hy
.SH NAME
.PP
\f[B]deb2docker\f[R] - Build a Docker image with given Debian packages
.SH SYNOPSIS
.PP
\f[B]deb2docker\f[R] [-hB][-c CMD][-f FROM][-n NAME][-o DIR][-p
PRE_SCRIPT][-s POST_SCRIPT] \f[I]packages\f[R]
.SH DESCRIPTION
.PP
\f[B]deb2docker\f[R] 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 \f[I]freedesktop.org\f[R] 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.
.PP
This tool is suited for deploying applications as containers, as well as
for testing Debian packages in a sandbox.
.SH OPTIONS
.TP
\f[B]-B\f[R]
do NOT build the image (default is to build).
A \f[I]build\f[R] script is generated in the DIR target directory.
.TP
\f[B]-c EXEC\f[R]
Command to run in the container (default to \f[I]/bin/bash\f[R]).
.TP
\f[B]-f FROM\f[R]
Distribution is to be used (default to \f[I]debian:stable\f[R]).
.TP
\f[B]-h\f[R]
Show this help
.TP
\f[B]-n NAME\f[R]
Name of the image (default is built from the package list).
.TP
\f[B]-o DIR\f[R]
Use given directory DIR for the build (default is in /tmp).
.TP
\f[B]-p PRE_SCRIPT\f[R]
Execute the given script \f[I]PRE_SCRIPT\f[R] before packages install.
.TP
\f[B]-s POST_SCRIPT\f[R]
Execute the given script \f[I]POST_SCRIPT\f[R] after packages install.
.TP
\f[B]packages\f[R]
The package list can be any Debian package, as well as local .deb files.
.SH FILES
.IP \[bu] 2
DIR/README
.IP \[bu] 2
DIR/Dockerfile
.IP \[bu] 2
DIR/launchers/
.IP \[bu] 2
DIR/icons/
.IP \[bu] 2
DIR/build
.IP \[bu] 2
DIR/start
.SH NOTES
.TP
You need of course to have Docker installed and be part of the \f[I]docker\f[R] group:
.IP \[bu] 2
sudo apt install docker.io
.IP \[bu] 2
sudo usermod -aG docker $USER\[ga]
.PP
You may have to manually configure Docker to pass a proxy configuration.
.PP
Usual commands typically used to handle Docker containers are:
.TP
\f[B]build\f[R]
docker build \[en]rm Dockerfile \f[B]run\f[R]
docker run \[en]rm -it NAME \f[B]clean\f[R]
docker rmi NAME \f[B]clean ALL\f[R]
docker system prune -a
.SH EXAMPLES
.TP
Create a Docker container with package \f[I]x11-apps\f[R] in directory \f[I]/tmp/xeyes\f[R], and launch \f[I]xeyes\f[R]:
.IP \[bu] 2
deb2docker -o /tmp/xeyes x11-apps
.IP \[bu] 2
/tmp/xeyes/start xeyes
.RS
.PP
A Desktop launcher is created as
/tmp/xeyes/launchers/x11-apps-terminal.desktop
.RE
.TP
Create a Docker container with \f[I]x11-apps\f[R] and \f[I]meshlab\f[R]
deb2docker x11-apps meshlab
.TP
Create a Docker container making sure software channels are active:
.IP \[bu] 2
echo \[lq]sed -i `s/main/main contrib non-free/g'
/etc/apt/sources.list\[rq] > pre.sh
.IP \[bu] 2
deb2docker -p pre.sh x11-apps
.SH AUTHORS
.PP
Emmanuel Farhi (emmanuel.farhi\[at]synchrotron-soleil.fr)
.SH SEE ALSO
.PP
deb2apptainer(1), distrobox-create(1), distrobox-enter(1), docker(1),
apptainer(1)
.SH AUTHORS
Emmanuel Farhi.