Skip to content

Commit

Permalink
Merge pull request rhtconsulting#125 from etsauer/docker-network
Browse files Browse the repository at this point in the history
Adding --net=host to put container on localhost network.
  • Loading branch information
oybed authored Jul 15, 2016
2 parents d04cd9d + 233ad80 commit 60db9b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docker/openstack-docker-client/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ do
-r=*|--repository=*)
REPOSITORY="${i#*=}"
shift;;
--host-net)
echo "Warning: Setting the --host-net flag adds \`--net=host\` to your docker run command. Be aware that this means your container can talk to any network service running on this host."
HOST_NET="--net=host"
shift;;
-h|--help)
usage;
exit 0;
Expand Down Expand Up @@ -113,4 +117,4 @@ fi

echo "Starting OpenStack Client Container...."
echo
docker run -it ${REMOVE_CONTAINER_ON_EXIT} -v ${OPENSTACK_CONFIG_DIR}:/root/.openstack:z ${REPOSITORY_VOLUME} ${SSH_VOLUME} ${ANSIBLE_CFG} ${OPENSTACK_CLIENT_IMAGE}
docker run -it ${HOST_NET} ${REMOVE_CONTAINER_ON_EXIT} -v ${OPENSTACK_CONFIG_DIR}:/root/.openstack:z ${REPOSITORY_VOLUME} ${SSH_VOLUME} ${ANSIBLE_CFG} ${OPENSTACK_CLIENT_IMAGE}

0 comments on commit 60db9b7

Please sign in to comment.