services: docker: image: docker:dind privileged: true pipeline: build: image: docker environment: - DOCKER_HOST=tcp://docker:2375 commands: - docker build -t devbuild . test: image: docker environment: - DOCKER_HOST=tcp://docker:2375 commands: - docker run --rm devbuild /bin/sh -xec 'true' - docker run --rm devbuild /bin/sh -xec 'test -f /lib/libc-*.so' - docker run --rm devbuild /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 'echo This is a test string | md5sum | cut -f1 -d\ ' | tee /dev/stderr)" = 'b584c39f97dfe71ebceea3fdb860ed6c' publish: image: docker secrets: [ DOCKER_USER, DOCKER_PASS ] environment: - DOCKER_HOST=tcp://docker:2375 commands: - docker login -u $DOCKER_USER -p $DOCKER_PASS - docker tag devbuild adamant/busybox:latest - docker tag devbuild adamant/busybox:1.1 - docker push adamant/busybox downstream: image: plugins/downstream secrets: [ DOWNSTREAM_TOKEN ] server: https://drone.adam-ant.co.uk fork: true repositories: - Adam-Ant/docker-busybox@libressl when: event: [ push, tag, deployment] status: [ success ]