39 lines
1.5 KiB
Markdown
39 lines
1.5 KiB
Markdown
```
|
|
USAGE
|
|
podmanRun [-m MODE] [-o OPTIONS] [COMMANDS [ARGS]...] [--help] [--debug]
|
|
|
|
COMMANDS
|
|
COMMANDS to run in the container
|
|
|
|
OPTIONS
|
|
--mode, -m MODE
|
|
1. recreate (remove container if it already exists and create a new one)
|
|
2. persistent (reuse existing container if it exists)
|
|
--options, -o OPTIONS
|
|
OPTIONS to pass to podman run/exec
|
|
Can be passed multiple times to concatenate
|
|
Will be split on whitespace
|
|
Final option should be the name of the container image
|
|
--debug, -d
|
|
Print debugging
|
|
--help, -h
|
|
Print this help message and exit
|
|
|
|
EXAMPLES
|
|
Note: IDE examples are using Atom Build package placeholders.
|
|
|
|
Run an ephemeral PHP webserver container using the current directory as webroot:
|
|
podmanRun -o "-p=8000:80 --name=php_script -v=$PWD:/var/www/html:z php:7.3-apache"
|
|
Run an ephemeral PHP webserver container using the current directory as webroot using IDE:
|
|
podmanRun -o "-p=8000:80 --name=php_{FILE_ACTIVE_NAME_BASE} \
|
|
-v={FILE_ACTIVE_PATH}:/var/www/html:z php:7.3-apache"
|
|
Run an ephemeral bash script:
|
|
podmanRun -o "--name=bash_script -v=$PWD:$PWD:z -w=$PWD debian:testing" ./script.sh
|
|
Run an ephemeral bash script using IDE:
|
|
podmanRun -o "--name=bash_{FILE_ACTIVE_NAME_BASE}" \
|
|
-o "-v={FILE_ACTIVE_PATH}:{FILE_ACTIVE_PATH}:z"
|
|
-o "-w={FILE_ACTIVE_PATH}" \
|
|
-o "debian:testing" \
|
|
{FILE_ACTIVE} arg1 arg2
|
|
```
|