Docker
These docs are deprecated. For the latest documentation, see
Docker image tasks.
Airplane supports building a task from a Dockerfile. This is useful if you're already familiar with
building Docker images and/or you want to fully customize your runtime environment.
Getting started
Getting started
To create a new Docker-based task, run
airplane init
choosing "Create from scratch" and
"Dockerfile":Copied1$ airplane init23? How do you want to get started?4> Create from scratch5? Pick a runtime:6> Dockerfile7? Pick a name:8> Hello World910Once you are ready, deploy it to Airplane with:11airplane deploy -f airplane.yml
This will create a barebones Docker task for you, with a task definition (
airplane.yml
) and
Dockerfile
.When
airplane deploy
is run, Airplane will build the Docker task for you:- Airplane runs
docker build
using the suppliedDockerfile
. - The entrypoint will be invoked with (the equivalent of)
docker run [image] -- [arguments...]
.
Example: Redis CLI
Example: Redis CLI
yamlCopied1# airplane.yml23slug: redis4name: Redis5builder: docker6builderConfig:7dockerfile: Dockerfile8arguments: ["set", "{{params.key}}", "{{params.value}}"]9parameters:10- name: Key11slug: key12type: string13- name: Value14slug: value15type: string
dockerfileCopied1FROM redis:6.223ENTRYPOINT ["redis-cli"]
Builder config reference
Builder config reference
The Docker builder supports the following options in the
task definition:
dockerfile
: path to the Dockerfile.
yamlCopied1dockerfile:2dockerfile: "Dockerfile"