Upgrade to Docker sock passthru, improves performance

This commit is contained in:
Adam Dodman 2017-09-15 17:14:10 +01:00
parent 0ede9e6b87
commit 57dc71b1ae

View File

@ -1,38 +1,36 @@
services:
docker:
image: docker:dind
privileged: true
pipeline: pipeline:
build: build:
image: docker image: docker
environment: volumes:
- DOCKER_HOST=tcp://docker:2375 - /var/run/docker.sock:/var/run/docker.sock
commands: commands:
- docker build -t devbuild . - docker build --no-cache --pull -t busybox-dev .
test: test:
image: docker image: docker
environment: volumes:
- DOCKER_HOST=tcp://docker:2375 - /var/run/docker.sock:/var/run/docker.sock
commands: commands:
- docker run --rm devbuild /bin/sh -xec 'true' - docker run --rm busybox-dev /bin/sh -xec 'true'
- docker run --rm devbuild /bin/sh -xec 'test -f /lib/libc-*.so' - docker run --rm busybox-dev /bin/sh -xec 'test -f /lib/libc-*.so'
- docker run --rm devbuild /bin/sh -xec 'ldconfig -p' - docker run --rm busybox-dev /bin/sh -xec 'ldconfig -p'
- docker run --rm devbuild /bin/sh -xec 'nslookup google.com' - docker run --rm busybox-dev /bin/sh -xec 'nslookup google.com'
- test "$(docker run --rm devbuild /bin/sh -xec 'date +%Z')" = 'UTC' - test "$(docker run --rm devbuild /bin/sh -xec 'date +%Z')" = 'UTC'
- test "$(docker run --rm devbuild /bin/sh -xec 'echo This is a test string | md5sum | cut -f1 -d\ ' | tee /dev/stderr)" = 'b584c39f97dfe71ebceea3fdb860ed6c' - test "$(docker run --rm devbuild /bin/sh -xec 'echo This is a test string | md5sum | cut -f1 -d\ ' | tee /dev/stderr)" = 'b584c39f97dfe71ebceea3fdb860ed6c'
publish: publish:
image: docker image: docker
secrets: [ DOCKER_USER, DOCKER_PASS ] secrets: [ DOCKER_USER, DOCKER_PASS ]
environment: when:
- DOCKER_HOST=tcp://docker:2375 event: [push, tag, deployment]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands: commands:
- docker login -u $DOCKER_USER -p $DOCKER_PASS - docker login -u $DOCKER_USER -p $DOCKER_PASS
- docker tag devbuild adamant/busybox:latest - docker tag busybox-dev adamant/busybox:latest
- docker tag devbuild adamant/busybox:1.1 - docker tag busybox-dev adamant/busybox:1.1
- docker push adamant/busybox - docker push adamant/busybox
- docker rmi busybox-dev adamant/busybox
downstream: downstream:
image: plugins/downstream image: plugins/downstream