You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
369 B
22 lines
369 B
#!/bin/bash
|
|
|
|
# potential flags: use other deploy config
|
|
|
|
if [[ -z $1 ]]; then
|
|
echo "Usage: $0 image [name]"
|
|
exit 1
|
|
fi
|
|
|
|
image=$1
|
|
if [[ -n $2 ]]; then
|
|
name=$2
|
|
else
|
|
name=$image
|
|
fi
|
|
|
|
podman create --name $name $image
|
|
podman start $name
|
|
|
|
# get container IP
|
|
printf "Container IP is: "
|
|
podman inspect -f '{{ .NetworkSettings.IPAddress }}' $cont
|
|
|