Skip to content

Instantly share code, notes, and snippets.

@coreypobrien
Created September 28, 2015 20:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coreypobrien/28b66c8a295ab16a74d4 to your computer and use it in GitHub Desktop.
Save coreypobrien/28b66c8a295ab16a74d4 to your computer and use it in GitHub Desktop.
add2dm.sh
#!/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