This commit is contained in:
Thomas Sileo 2019-04-12 09:38:33 +02:00
parent be1c816393
commit 9f3bb4d421

View file

@ -1,7 +1,7 @@
pipeline: kind: pipeline
# this code will create a dummy Dockerfile. This is just name: default
# here so that our yaml file is self-contained. steps:
setup: - name: setup
image: golang image: golang
commands: commands:
- | - |
@ -16,7 +16,7 @@ pipeline:
CMD httpd -p 8000 -h /www; tail -f /dev/null CMD httpd -p 8000 -h /www; tail -f /dev/null
EOF EOF
build: - name: build
image: docker:dind image: docker:dind
environment: environment:
- DOCKER_HOST=tcp://docker:2375 - DOCKER_HOST=tcp://docker:2375
@ -28,7 +28,7 @@ pipeline:
# start the container using a detached (non-blocking) # start the container using a detached (non-blocking)
# step. Bonus we can see our container logs in the # step. Bonus we can see our container logs in the
# build output. # build output.
run: - name: run
image: docker:dind image: docker:dind
detach: true detach: true
environment: environment:
@ -39,7 +39,7 @@ pipeline:
# curl the container to test it is up and running. # curl the container to test it is up and running.
# notice that we use `docker:8000` since the container # notice that we use `docker:8000` since the container
# is running in the docker service container. # is running in the docker service container.
test: - name: test
image: golang # because I know it has curl installed image: golang # because I know it has curl installed
commands: commands:
- curl -v http://docker:8000 - curl -v http://docker:8000