Skip to content

Instantly share code, notes, and snippets.

@tianon
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tianon/b723a04138813d51a1c7 to your computer and use it in GitHub Desktop.
Save tianon/b723a04138813d51a1c7 to your computer and use it in GitHub Desktop.
windows dind for docker jenkins
commithash="$(git log -1 --shorthashwhateveritis)"
docker build -t "docker:$commithash" .
docker run -it --privileged -d --name "docker-$commithash" -p 2375 -P "docker:$commithash" bash -c 'hack/make.sh binary && exec bundles/docker-*/binary/docker -d -D -H tcp://0.0.0.0:2375'
port="$(docker inspect -f '{{index .NetworkSettings.Ports "2375/tcp" 0 "HostPort"}}' docker-$commithash)"
ip="${DOCKER_HOST#*://}"
ip="${ip%%:*}"
(
export DOCKER_HOST="tcp://$ip:$port"
# the rest as it is right now, blah blah blah ./hack/make.sh dynbinary test-integration-cli
)
@jessfraz
Copy link

$(git rev-parse --short HEAD)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment