Skip to content

Commit

Permalink
Try running podman with '--net=host'
Browse files Browse the repository at this point in the history
  • Loading branch information
tmds committed May 29, 2019
1 parent 7464b01 commit 7a986e6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 9 additions & 2 deletions 2.1/build/test/testcommon
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"
Expand Down
11 changes: 9 additions & 2 deletions 2.1/runtime/test/testcommon
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"
Expand Down

0 comments on commit 7a986e6

Please sign in to comment.