Merge pull request #1407 from drwetter/dockerIDcheck
Handle problem when pulling container fails
This commit is contained in:
commit
b38e433ec4
|
@ -5,6 +5,8 @@ image=${1:-"debian:buster"}
|
|||
docker pull "$image"
|
||||
ID=$(docker run -d -ti $image)
|
||||
|
||||
[[ "$ID" ]] && echo "container couldn't be retrieved" >&2 && exit 1
|
||||
|
||||
docker exec -ti $ID apt-get update
|
||||
docker exec -ti $ID apt-get install -y ssl-cert dialog
|
||||
docker exec -ti $ID apt-get install -y nginx-common nginx-light
|
||||
|
|
|
@ -6,6 +6,8 @@ ID=$(docker run -d -ti $image)
|
|||
|
||||
echo $ID
|
||||
|
||||
[[ "$ID" ]] && echo "container couldn't be retrieved" >&2 && exit 1
|
||||
|
||||
docker exec -ti $ID nginx -V
|
||||
docker exec -ti $ID mkdir /etc/nginx/ssl
|
||||
HN=$(docker exec -ti $ID hostname| tr -d '\n' | tr -d '\r')
|
||||
|
|
Loading…
Reference in New Issue