From 7a986e6d7c82bb49cef719d8da07c1749757a25d Mon Sep 17 00:00:00 2001 From: Tom Deseyn Date: Wed, 29 May 2019 20:30:10 +0200 Subject: [PATCH] Try running podman with '--net=host' --- 2.1/build/test/testcommon | 11 +++++++++-- 2.1/runtime/test/testcommon | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/2.1/build/test/testcommon b/2.1/build/test/testcommon index 349c00af8..07c8a55a4 100644 --- a/2.1/build/test/testcommon +++ b/2.1/build/test/testcommon @@ -187,7 +187,7 @@ docker_run_as_d() { if [ "$USING_PODMAN" ]; then local image_as_user=$(_podman_build_image_as_user "$image" "$user") - output=$(podman run -d -p ${TEST_PORT}:8080 ${image_as_user} 2>&1) + output=$(podman run -d --net=host -p ${TEST_PORT}:8080 ${image_as_user} 2>&1) run_rv=$? else output=$(docker run --user="${user}" -d -p ${TEST_PORT}:8080 ${image} 2>&1) @@ -204,7 +204,14 @@ docker_run_as_d() { docker_run_d() { local image="$1" local output; - output=$(docker run -d -p ${TEST_PORT}:8080 ${image} 2>&1) + local run_rv; + if [ "$USING_PODMAN" ]; then + output=$(podman run -d --net=host -p ${TEST_PORT}:8080 ${image} 2>&1) + run_rv=$? + else + output=$(docker run -d -p ${TEST_PORT}:8080 ${image} 2>&1) + run_rv=$? + fi if [ $? -ne 0 ]; then error "$output" echo "no-container" diff --git a/2.1/runtime/test/testcommon b/2.1/runtime/test/testcommon index 349c00af8..07c8a55a4 100644 --- a/2.1/runtime/test/testcommon +++ b/2.1/runtime/test/testcommon @@ -187,7 +187,7 @@ docker_run_as_d() { if [ "$USING_PODMAN" ]; then local image_as_user=$(_podman_build_image_as_user "$image" "$user") - output=$(podman run -d -p ${TEST_PORT}:8080 ${image_as_user} 2>&1) + output=$(podman run -d --net=host -p ${TEST_PORT}:8080 ${image_as_user} 2>&1) run_rv=$? else output=$(docker run --user="${user}" -d -p ${TEST_PORT}:8080 ${image} 2>&1) @@ -204,7 +204,14 @@ docker_run_as_d() { docker_run_d() { local image="$1" local output; - output=$(docker run -d -p ${TEST_PORT}:8080 ${image} 2>&1) + local run_rv; + if [ "$USING_PODMAN" ]; then + output=$(podman run -d --net=host -p ${TEST_PORT}:8080 ${image} 2>&1) + run_rv=$? + else + output=$(docker run -d -p ${TEST_PORT}:8080 ${image} 2>&1) + run_rv=$? + fi if [ $? -ne 0 ]; then error "$output" echo "no-container"