Created
August 23, 2013 02:14
-
-
Save koko1000ban/6314886 to your computer and use it in GitHub Desktop.
docker lunch on private
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CONTAINERS=(app mysql redis memcached) | |
for container in ${CONTAINERS[@]}; do | |
container_id=$(sudo docker run -d -dns 172.17.42.1 tabito/centos_base) | |
echo "$(sudo docker inspect ${container_id} | grep IPAddress | cut -d '"' -f 4) ${container}.local" | sudo tee -a /etc/hosts | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment