Overview

A docker pipeline is a pipeline that executes shell commands inside Docker containers. Docker containers provide isolation allowing safe execution of concurrent pipelines on the same machine.

A major benefit of container pipelines is the ability to bring your own build environment, in the form of a Docker image. Drone automatically downloads docker images at runtime.

Example pipeline configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
---
kind: pipeline
type: docker
name: default

steps:
- name: greeting
  image: golang:1.12
  commands:
  - go build
  - go test

...

The kind and type attributes define a Docker pipeline.

1
2
3
---
kind: pipline
type: docker

The steps section defines a series of shell commands. These commands are executed inside the Docker container as the Entrypoint. If any command returns a non-zero exit code, the pipeline fails and exits.

6
7
8
9
10
11
steps:
- name: greeting
  image: golang:1.12
  commands:
  - go build
  - go test