Add Atom build tests and README
This commit is contained in:
5
.atom-build.yml
Normal file
5
.atom-build.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
cmd: './podmanRun -o "--name=bash_{FILE_ACTIVE_NAME_BASE} -v={FILE_ACTIVE_PATH}:{FILE_ACTIVE_PATH}:z -w={FILE_ACTIVE_PATH} ubuntu:latest" test.sh "hello world!"'
|
||||
name: 'Test podmanRun'
|
||||
targets:
|
||||
Test podmanRun w/ debug:
|
||||
cmd: './podmanRun --debug -o "--name=bash_{FILE_ACTIVE_NAME_BASE} -v={FILE_ACTIVE_PATH}:{FILE_ACTIVE_PATH}:z -w={FILE_ACTIVE_PATH} ubuntu:latest" test.sh "hello world!"'
|
||||
38
README.md
Normal file
38
README.md
Normal file
@@ -0,0 +1,38 @@
|
||||
```
|
||||
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
|
||||
```
|
||||
@@ -31,7 +31,7 @@ podmanRun() {
|
||||
if [[ -z $_debug ]]; then
|
||||
cat <<-'EOF'
|
||||
USAGE
|
||||
podmanRun -m MODE -o OPTIONS [COMMANDS [ARGS]...] [--help] [--debug]
|
||||
podmanRun [-m MODE] [-o OPTIONS] [COMMANDS [ARGS]...] [--help] [--debug]
|
||||
|
||||
COMMANDS
|
||||
COMMANDS to run in the container
|
||||
@@ -43,6 +43,7 @@ OPTIONS
|
||||
--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
|
||||
@@ -54,11 +55,14 @@ EXAMPLES
|
||||
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user