Pass container scripts' parameters to podman
This commit is contained in:
parent
00fb91b96f
commit
b4899eec30
2 changed files with 5 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
set -eu
|
set -eu
|
||||||
suffix=$(printf '%s' "$1" | sed 's/.*\.//')
|
suffix=$(printf '%s' "$1" | sed 's/.*\.//')
|
||||||
tag="en:$suffix"
|
tag="en:$suffix"
|
||||||
|
shift
|
||||||
|
|
||||||
if podman container exists "$tag"; then
|
if podman container exists "$tag"; then
|
||||||
podman stop --time 3 "$tag"
|
podman stop --time 3 "$tag"
|
||||||
|
|
@ -16,7 +17,7 @@ fi
|
||||||
|
|
||||||
podman build \
|
podman build \
|
||||||
--tag "$tag" \
|
--tag "$tag" \
|
||||||
-f "Containerfile.$suffix"
|
-f "Containerfile.$suffix" "$@"
|
||||||
|
|
||||||
if [ -f en ]; then
|
if [ -f en ]; then
|
||||||
rm -v en
|
rm -v en
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,12 @@ set -eu
|
||||||
suffix=$(printf '%s' "$1" | sed 's/.*\.//')
|
suffix=$(printf '%s' "$1" | sed 's/.*\.//')
|
||||||
name="en-$suffix"
|
name="en-$suffix"
|
||||||
tag="en:$suffix"
|
tag="en:$suffix"
|
||||||
|
shift
|
||||||
|
|
||||||
podman run \
|
podman run \
|
||||||
--replace \
|
--replace \
|
||||||
--name "$name" \
|
--name "$name" \
|
||||||
--publish 3008:80 \
|
--publish 3008:80 \
|
||||||
|
--init \
|
||||||
|
"$@" \
|
||||||
"$tag"
|
"$tag"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue