-
-
Notifications
You must be signed in to change notification settings - Fork 3
runpod.1
runpod - Run indimail podman / docker image using podman / docker
runpod [OPTIONS] prog arg arg ...
runpod is a frontend for podman(1) / docker(1) to help execute indimail containers. indimail containers can be downloaded from
https://hub.docker.com/u/cprogrammer
or
https://github.com/orgs/indimail/packages
prog is usually the binary to be executed on startup. prog also can have a special meaning. if prog is indimail, indimail-mta, svscan, webmail, runpod will let docker-entrypoint(8) execute svscan(8) in the container. This will start an services configured in the /service directory of the container image. If you don't want this, you can set name to execute something else instead of svscan. If name is test or devel, bash will be executed with a controlling terminal and also remove the container on exit. If name is svscan, bash will be executed with a controlling terminal, but the container will not be removed on exit. If prog is auto, 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 prog is set as auto, then runpod will instruct podman or docker to execute systemd(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 prog, use -- to prevent the options getting passed to runpod instead of prog.
e.g. The below passes the timezone parameter to indimail's docker-entrypoint(8).
runpod --id=2a13c928f3aa --name=svscan -- -t UTC
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 runpod command with indimail contianers. Here --id=9f0e74d71e91 refers to an indimail-mta-web container image.
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
--id=imageID | -i imageID
Use this option to specify image id
--name=name | -n name
Use this option to specify name for the running image. name has
special significance if name is either of indimail,
indimail-mta, webmail which causes following ports to be mapped
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
name is what you see in the podman ps or the docker ps command.
--args=extra_args | -a extra_args
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.
--capability=cap | -C cap
Use this option to add capabilities like SYS_PTRACE, SYS_ADMIN,
IPC_LOCK, SYS_RESOURCE. You can specify this option multiple times.
--host=host | -h host
Specify hostname for the container.
--port=lport:rport -p lport:rport
Map local port lport to remote port rport in the container. You can
specify this option multiple times.
--command=docker|podman | -c docker|podman
Use docker(1) or podman(1) to run the container. Default is
podman(1).
--volume=local_dir:remote_dir | -v
local_dir:remote_dir mount local_dir as remote_dir in the
container. You can specify this option multiple times.
--cgroup=group | -g group
Specify group for cgroups. You can specify this option multiple times.
docker(1) podman(1) docker-entrypoint(8),