Use proper statement to retrieve the IP of an docker instance
This commit is contained in:
parent
0c1a8c953a
commit
a91572b7f3
|
@ -41,7 +41,7 @@ container=`docker run -d \
|
||||||
-e RGW_CIVETWEB_PORT=$port \
|
-e RGW_CIVETWEB_PORT=$port \
|
||||||
${docker_image}`
|
${docker_image}`
|
||||||
|
|
||||||
host=`docker inspect $container | grep IPAddress | cut -d '"' -f 4`
|
host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container`
|
||||||
|
|
||||||
|
|
||||||
echo "${docker_image} container: $container"
|
echo "${docker_image} container: $container"
|
||||||
|
|
|
@ -34,7 +34,7 @@ password=12345
|
||||||
|
|
||||||
container=`docker run -d -e USERNAME=$user -e PASSWORD=$password morrisjobke/docker-proftpd`
|
container=`docker run -d -e USERNAME=$user -e PASSWORD=$password morrisjobke/docker-proftpd`
|
||||||
|
|
||||||
host=`docker inspect $container | grep IPAddress | cut -d '"' -f 4`
|
host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container`
|
||||||
|
|
||||||
cat > $thisFolder/config.ftp.php <<DELIM
|
cat > $thisFolder/config.ftp.php <<DELIM
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -34,7 +34,7 @@ password=12345
|
||||||
|
|
||||||
container=`docker run -d atmoz/sftp $user:$password:1001`
|
container=`docker run -d atmoz/sftp $user:$password:1001`
|
||||||
|
|
||||||
host=`docker inspect $container | grep IPAddress | cut -d '"' -f 4`
|
host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container`
|
||||||
|
|
||||||
cat > $thisFolder/config.sftp.php <<DELIM
|
cat > $thisFolder/config.sftp.php <<DELIM
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -31,7 +31,7 @@ fi;
|
||||||
|
|
||||||
container=`docker run -d -e SMB_USER=test -e SMB_PWD=test silvershell/samba`
|
container=`docker run -d -e SMB_USER=test -e SMB_PWD=test silvershell/samba`
|
||||||
|
|
||||||
host=`docker inspect $container | grep IPAddress | cut -d '"' -f 4`
|
host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container`
|
||||||
|
|
||||||
cat > $thisFolder/config.smb.php <<DELIM
|
cat > $thisFolder/config.smb.php <<DELIM
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -190,7 +190,7 @@ function execute_tests {
|
||||||
-e MYSQL_PASSWORD=owncloud \
|
-e MYSQL_PASSWORD=owncloud \
|
||||||
-e MYSQL_DATABASE="$DATABASENAME" \
|
-e MYSQL_DATABASE="$DATABASENAME" \
|
||||||
-d rullzer/mariadb-owncloud)
|
-d rullzer/mariadb-owncloud)
|
||||||
DATABASEHOST=$(docker inspect "$DOCKER_CONTAINER_ID" | grep IPAddress | cut -d '"' -f 4)
|
DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID")
|
||||||
|
|
||||||
echo "Waiting for MariaDB initialisation ..."
|
echo "Waiting for MariaDB initialisation ..."
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ function execute_tests {
|
||||||
if [ ! -z "$USEDOCKER" ] ; then
|
if [ ! -z "$USEDOCKER" ] ; then
|
||||||
echo "Fire up the postgres docker"
|
echo "Fire up the postgres docker"
|
||||||
DOCKER_CONTAINER_ID=$(docker run -e POSTGRES_USER="$DATABASEUSER" -e POSTGRES_PASSWORD=owncloud -d postgres)
|
DOCKER_CONTAINER_ID=$(docker run -e POSTGRES_USER="$DATABASEUSER" -e POSTGRES_PASSWORD=owncloud -d postgres)
|
||||||
DATABASEHOST=$(docker inspect "$DOCKER_CONTAINER_ID" | grep IPAddress | cut -d '"' -f 4)
|
DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID")
|
||||||
|
|
||||||
echo "Waiting for Postgres initialisation ..."
|
echo "Waiting for Postgres initialisation ..."
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ function execute_tests {
|
||||||
if [ "$DB" == "oci" ] ; then
|
if [ "$DB" == "oci" ] ; then
|
||||||
echo "Fire up the oracle docker"
|
echo "Fire up the oracle docker"
|
||||||
DOCKER_CONTAINER_ID=$(docker run -d deepdiver/docker-oracle-xe-11g)
|
DOCKER_CONTAINER_ID=$(docker run -d deepdiver/docker-oracle-xe-11g)
|
||||||
DATABASEHOST=$(docker inspect "$DOCKER_CONTAINER_ID" | grep IPAddress | cut -d '"' -f 4)
|
DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID")
|
||||||
|
|
||||||
echo "Waiting for Oracle initialization ... "
|
echo "Waiting for Oracle initialization ... "
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ container=`docker run -d \
|
||||||
--privileged \
|
--privileged \
|
||||||
--entrypoint /entrypoint.sh ${docker_image}`
|
--entrypoint /entrypoint.sh ${docker_image}`
|
||||||
|
|
||||||
host=`docker inspect $container | grep IPAddress | cut -d '"' -f 4`
|
host=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$container")
|
||||||
|
|
||||||
|
|
||||||
echo "${docker_image} container: $container"
|
echo "${docker_image} container: $container"
|
||||||
|
|
Loading…
Reference in New Issue