File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,19 +3,23 @@ source $(realpath $(dirname $0))/common.inc.sh
33
44nonloopback=" $( hostname -I | awk ' {print $1}' ) "
55
6+
7+ SLEEP_SECS=2
8+ [ " $DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER " = " implicit" ] && SLEEP_SECS=10
9+
610docker rm -f nginx > /dev/null 2>&1 || true
711
812CURL=" curl -fsSL"
913set -x
1014
1115docker run -d --name=nginx -p 8080:80 nginx:alpine
12- sleep 2
16+ sleep " $SLEEP_SECS "
1317$CURL " http://127.0.0.1:8080"
1418$CURL " http://${nonloopback} :8080"
1519docker rm -f nginx
1620
1721docker run -d --name=nginx -p 127.0.0.1:8080:80 nginx:alpine
18- sleep 2
22+ sleep " $SLEEP_SECS "
1923$CURL " http://127.0.0.1:8080"
2024$CURL " http://${nonloopback} :8080" && ( ERROR " should fail" ; exit 1 )
2125docker rm -f nginx
@@ -24,7 +28,7 @@ docker rm -f nginx
2428# "Error starting userland proxy: listen tcp4 172.18.0.2:8080: bind: cannot assign requested address."
2529if [ " $DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER " != " implicit" ]; then
2630 docker run -d --name=nginx -p " ${nonloopback} :8080:80" nginx:alpine
27- sleep 2
31+ sleep " $SLEEP_SECS "
2832 $CURL " http://127.0.0.1:8080" && ( ERROR " should fail" ; exit 1 )
2933 $CURL " http://${nonloopback} :8080"
3034 docker rm -f nginx
You can’t perform that action at this time.
0 commit comments