Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/files_external/tests/env/start-amazons3-ceph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ container=`docker run -d \
-v "$notify_sock":/run/notifyme.sock \
${docker_image}`

host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container`
host=`docker inspect --format="{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" $container`


echo "${docker_image} container: $container"
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/tests/env/start-ftp-morrisjobke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ password=12345

container=`docker run -d -e USERNAME=$user -e PASSWORD=$password morrisjobke/docker-proftpd`

host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container`
host=`docker inspect --format="{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" $container`

cat > $thisFolder/config.ftp.php <<DELIM
<?php
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/tests/env/start-sftp-atmoz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ password=12345

container=`docker run -d atmoz/sftp $user:$password:1001`

host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container`
host=`docker inspect --format="{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" $container`

cat > $thisFolder/config.sftp.php <<DELIM
<?php
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/tests/env/start-swift-ceph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ container=`docker run -d \
-v "$notify_sock":/run/notifyme.sock \
${docker_image}`

host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container`
host=`docker inspect --format="{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" $container`


echo "${docker_image} container: $container"
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/tests/env/start-webdav-apache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if [ -n "$RUN_DOCKER_MYSQL" ]; then
fi

container=`docker run -P $parameter -d --rm ghcr.io/nextcloud/continuous-integration-webdav-apache:latest`
host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container`
host=`docker inspect --format="{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" $container`

echo -n "Waiting for Apache initialization on ${host}:${port}"
if ! "$thisFolder"/env/wait-for-connection ${host} 80 60; then
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/tests/env/start-webdav-ownCloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fi

container=`docker run -P $parameter -d -e ADMINLOGIN=test -e ADMINPWD=test morrisjobke/owncloud`

host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container`
host=`docker inspect --format="{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" $container`

echo -n "Waiting for Nextcloud initialization"
if ! "$thisFolder"/env/wait-for-connection ${host} 80 60; then
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/tests/sso-setup/start-apache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SCRIPT_DIR="${0%/*}"
docker rm -f apache 2>/dev/null > /dev/null

docker run -d --name apache -v $2:/var/www/html -v /var/www/html/data -v /var/www/html/config -v /var/www/html/extra-apps -v /tmp/shared:/shared --dns $1 --hostname httpd.domain.test icewind1991/samba-krb-test-apache 1>&2
APACHE_IP=$(docker inspect apache --format '{{.NetworkSettings.IPAddress}}')
APACHE_IP=$(docker inspect apache --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}')
docker exec apache chown 33 /var/www/html/config /var/www/html/data /var/www/html/extra-apps
docker cp "$SCRIPT_DIR/apps.config.php" apache:/var/www/html/config/apps.config.php

Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/tests/sso-setup/start-dc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ docker run -dit --name dc -v /tmp/shared:/shared --hostname krb.domain.test --ca

waitContainer dc

docker inspect dc --format '{{.NetworkSettings.IPAddress}}'
docker inspect dc --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'
7 changes: 6 additions & 1 deletion cypress/dockerNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,12 @@ export const getContainerIP = async function(
if (err) {
throw err
}
ip = data?.NetworkSettings?.IPAddress || ''
// Docker 29 removed the deprecated top-level NetworkSettings.IPAddress,
// so read it from the attached networks instead.
const networks = Object.values(data?.NetworkSettings?.Networks || {})
ip = networks.map((network) => network?.IPAddress).find((address) => !!address)
|| data?.NetworkSettings?.IPAddress
|| ''
})

if (ip !== '') {
Expand Down
Loading