Created
September 28, 2015 20:00
-
-
Save coreypobrien/28b66c8a295ab16a74d4 to your computer and use it in GitHub Desktop.
add2dm.sh
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 -e | |
NAME=$1 | |
DM_DIR=~/.docker/machine/machines/$NAME | |
if [ "$2" != "" ]; then | |
unzip -qojd add2dm-tmp $2 | |
trap "rm -rf $(pwd)/add2dm-tmp" EXIT | |
pushd add2dm-tmp > /dev/null | |
fi | |
source docker.env | |
docker-machine create --url=$DOCKER_HOST $NAME | |
cp *.pem $DM_DIR/ | |
cp $DM_DIR/cert.pem $DM_DIR/server.pem | |
cp $DM_DIR/key.pem $DM_DIR/server-key.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment