The Docker step lets you create steps that will be executed inside Docker containers. The only restriction is that these containers are based on Linux and hosted on Docker Hub are that the images are already pulled and available in your local Docker images.
Name of the step, you can use any letters and dashes.
name: setup-project
Name of the Docker image to use with its version (ex: alpine/git:v2.32.0)
image: ubuntu:latest
Base workdir for your commands' execution (must be an absolute path)
workdir: /app
Commands that will run on that container, to use multiline command, you can use the syntax with the |
character :
commands: echo Hello World !
---
commands: |
apt-get update -y
apt-get install cowsay
cowsay "Hello World"
List of volume that will be persisted through the steps
persist:
- name: my-volume
source: /app
Name of the volume (it won't be called that way in when created in Docker, but you will be able to reference it with that name)
Path in the container that will be mapped to that volume.
List of string
that represents the steps that needs to be executed before that one.
depends_on:
- step1
- step2
- step3