Created
November 17, 2015 23:32
-
-
Save sirkkalap/7d84c18a1bb22709b489 to your computer and use it in GitHub Desktop.
Run a vanilla centos6 and mount current directory in it as /local
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/sh | |
| BASEDIR=$(cd $(dirname $0); /bin/pwd) | |
| if [ ! -z $DOCKER_MACHINE_NAME ]; then | |
| ip=$(docker-machine ip $DOCKER_MACHINE_NAME) | |
| docker run -i -t \ | |
| --name centos6 \ | |
| -v $BASEDIR:/local \ | |
| centos:6 \ | |
| bash | |
| else | |
| echo "docker-machine is needed." | |
| echo "Check your environment for \$DOCKER_MACHINE_NAME" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment