Created
May 12, 2016 19:28
-
-
Save mcenirm/582f7c049de4e7a089e2068621dc194f to your computer and use it in GitHub Desktop.
This file contains 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 | |
name=$( basename "$0" .bash ) | |
_stop () { | |
docker kill "$name" | |
docker rm "$name" | |
} | |
_e () { | |
docker exec "$name" "$@" | |
} | |
_stop | |
set -e | |
set -x | |
docker run --rm --name "$name" -e http_proxy=http://192.168.99.1:3128 centos:7.2.1511 sleep 300 & | |
sleep 1 | |
_e yum -y install /usr/sbin/ip | |
_e /usr/sbin/ip addr show | |
_stop | |
wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment