-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runpod.1
133 lines (106 loc) · 4.66 KB
/
runpod.1
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
.\" vim: tw=75
.TH runpod 1
.SH NAME
runpod \- Run indimail podman / docker image using podman / docker
.SH SYNOPSIS
\fBrunpod\fR [\fIOPTIONS\fR] \fIprog\fR \fIarg\fR \fIarg\fR ...
.SH DESCRIPTION
\fBrunpod\fR is a frontend for \fBpodman\fR(1) / \fBdocker\fR(1) to help
execute indimail containers. indimail containers can be downloaded from
.nf
https://hub.docker.com/u/cprogrammer
or
https://github.com/orgs/indimail/packages
.fi
\fIprog\fR is usually the binary to be executed on startup. \fIprog\fR also
can have a special meaning. if \fIprog\fR is indimail, indimail-mta,
svscan, webmail, runpod will let \fBdocker-entrypoint\fR(8) execute
\fBsvscan\fR(8) in the container. This will start an services configured in
the \fB/service\fR directory of the container image. If you don't want
this, you can set \fBname\fR to execute something else instead of
\fBsvscan\fR. If \fIname\fR is \fBtest\fR or \fBdevel\fR, bash will be
executed with a controlling terminal and also remove the container on exit.
If \fIname\fR is \fBsvscan\fR, bash will be executed with a controlling
terminal, but the container will not be removed on exit. If \fIprog\fR is
\fBauto\fR, systemd will be loaded for debian, ubuntu, fedora, centos,
almalinux, oraclelinux, opensuse images. For alpine linux bash will be
loaded with a controlling terminal. If systemd is empty, the default entry
point for the container will be used. If \fIprog\fR is set as auto, then
\fBrunpod\fR will instruct podman or docker to execute \fBsystemd\fR(1) if
the image supports systemd or execute /sbin/init for alpine and gentoo
images.
If you need to pass any command line switches to \fBprog\fR, use \-\- to
prevent the options getting passed to \fBrunpod\fR instead of \fBprog\fR.
e.g. The below passes the timezone parameter to indimail's
\fBdocker-entrypoint\fR(8).
.EX
runpod --id=2a13c928f3aa --name=svscan \-\- -t UTC
.EE
.SH Examples with indimail, indimail-mta, indimail-web containers
indimail-mta, indimail-virtualdomains and indimail-web containers use
docker-entrypoint(8). The docker-entrypoint does few initialization and
configuration to self configure for your domain. The examples below give
you a general idea on how to use the \fBrunpod\fR command with indimail
contianers. Here --id=9f0e74d71e91 refers to an indimail-mta-web container
image.
.EX
Execute ls -l in indimail's webmail container, pass -t Asia/Kolkata to the
docker-entrypoint. Pass additional \-\- before ls -l so that the
docker-entrypoint doesn't interpret -l option.
runpod -a "--rm" --id=9f0e74d71e91 -n webmail -- \\
-t Asia/Kolkata -- /bin/ls -l
Execute bash
runpod -a "--rm" --id=9f0e74d71e91 -n webmail -- \\
-t Asia/Kolkata -- /bin/bash
Execute repair shell. You can fix things in the container and commit the
image before coming out
runpod -a "--rm" --id=9f0e74d71e91 -n webmail -- -r
.EE
.SH OPTIONS
.TP 2
\fB\-\-id\fR=\fIimageID\fR | -i \fIimageID\fR
Use this option to specify image id
.TP
\fB\-\-name\fR=\fIname\fR | -\fBn\fR \fIname\fR
Use this option to specify name for the running image. \fIname\fR has
special significance if name is either of \fBindimail\fR,
\fBindimail-mta\fR, \fBwebmail\fR which causes following ports to be mapped
.EX
2025 -> 25, 2106 -> 106, 2110 -> 110 2143 -> 143, 2209 -> 209,
2366 -> 366, 2465 -> 465, 2587 -> 587 2628 -> 628, 2993 -> 993,
2995 -> 995, 3110 -> 4110 3143 -> 4143, 5110 -> 9110, 5143 -> 9143,
8080 -> 80
.EE
\fIname\fR is what you see in the \fBpodman\fR ps or the \fBdocker\fR ps
command.
.TP
\fB\-\-args\fR=\fIextra_args\fR | -\fBa\fR \fIextra_args\fR
Pass extra arguments to podman or docker command. You need use this for
every extra arg that you need to supply to the podman or docker command.
.TP
\fB\-\-capability\fR=\fIcap\fR | -\fBC\fR \fIcap\fR
Use this option to add capabilities like SYS_PTRACE, SYS_ADMIN, IPC_LOCK,
SYS_RESOURCE. You can specify this option multiple times.
.TP
\fB\-\-host\fR=\fIhost\fR | -\fBh\fR \fIhost\fR
Specify hostname for the container.
.TP
\fB\-\-port\fR=\fIlport\fR:\fIrport\fR -\fBp\fR \fIlport\fR:\fIrport\fR
Map local port \fIlport\fR to remote port \fIrport\fR in the container. You
can specify this option multiple times.
.TP
\fB\-\-command\fR=\fIdocker\fR|\fIpodman\fR | -\fBc\fR \fIdocker\fR|\fIpodman\fR
Use \fBdocker\fR(1) or \fBpodman\fR(1) to run the container. Default is
\fBpodman\fR(1).
.TP
\fB\-\-volume\fR=\fIlocal_dir\fR:\fIremote_dir\fR | \fB\-v\fR
\fIlocal_dir\fR:\fIremote_dir\fR mount \fIlocal_dir\fR as \fIremote_dir\fR
in the container. You can specify this option multiple times.
.TP
\fB\-\-cgroup\fR=\fIgroup\fR | -\fBg\fR \fIgroup\fR
Specify \fIgroup\fR for cgroups. You can specify this option multiple
times.
.SH SEE ALSO
docker(1),
podman(1)
docker-entrypoint(8)