Cleanup help
This commit is contained in:
24
podmanRun
24
podmanRun
@@ -26,10 +26,6 @@
|
||||
|
||||
podmanRun() {
|
||||
|
||||
########################
|
||||
###### FUNCTIONS #######
|
||||
########################
|
||||
|
||||
_printHelpAndExit() {
|
||||
|
||||
if [[ -z $_debug ]]; then
|
||||
@@ -57,17 +53,18 @@ 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" -o "--name=php_script" -o "-v=$PWD:/var/www/html:z" -o "php:7.3-apache"
|
||||
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" -o "--name=php_{FILE_ACTIVE_NAME_BASE}" \
|
||||
-o "-v={FILE_ACTIVE_PATH}:/var/www/html:z" -o "php:7.3-apache"
|
||||
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" -o "-v=$PWD:$PWD:z" -o "-w=$PWD"
|
||||
-o "debian:testing" "./script.sh"
|
||||
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}"
|
||||
-o "-v={FILE_ACTIVE_PATH}:{FILE_ACTIVE_PATH}:z"
|
||||
-o "-w={FILE_ACTIVE_PATH}" \
|
||||
-o "debian:testing" \
|
||||
{FILE_ACTIVE} arg1 arg2
|
||||
EOF
|
||||
fi
|
||||
|
||||
@@ -129,6 +126,7 @@ EOF
|
||||
[[ ! "$_mode" =~ ^(recreate|persistent)$ ]] && err "Bad --mode" && _printHelpAndExit 1
|
||||
|
||||
# Split options on whitespace
|
||||
# This assumes that podman options are properly formatted
|
||||
# https://unix.stackexchange.com/a/519917/382539
|
||||
readarray -td' ' _opts_arr < <(printf '%s' "${_opts_arr[*]}")
|
||||
|
||||
@@ -192,10 +190,6 @@ EOF
|
||||
}
|
||||
|
||||
|
||||
#########################
|
||||
####### EXECUTE #########
|
||||
#########################
|
||||
|
||||
__main() {
|
||||
|
||||
# Get input
|
||||
|
||||
Reference in New Issue
Block a user