Docker
NOTE: Since version 0.15.0 convey no longer uses Docker and instead uses podman. The Docker tasks are currently still available for backwards compatibility, but will be removed in a future version. They do a best effort to apply their original functionality to the podman tasks but not everything maps 100%. Please see individual task documentation for additional information.
docker/build
DEPRECATED: The docker/build task has been deprecated since version 0.15.0. Use the podman/build task instead.
This task will build a container image.
Attributes
NOTE: arguments and files are not currently mapped into the podman/build task.
Name | Required | Default | Description |
---|---|---|---|
arguments | A list of build arguments to pass to the build. | ||
dockerfile | Yes | The dockerfile to build. | |
files | A list of files that should be made available for the build. | ||
labels | A list of labels to set on the container image being built. | ||
tag | A tag to apply to the image. | ||
tags | A list of tags to be applied to the image. | ||
target | The name of the target to build in a multi stage dockerfile. |
Example
build:
type: docker/build
dockerfile: Dockerfile
tag: myimage:latest
docker/environment
DEPRECATED: The docker/environment task has been deprecated since version 0.15.0 and has no replacement.
The functionality of this task has been removed and the task now just fails. If you have a use case for this task and would like to keep it, please file an issue in our issue tracker.
docker/export
DEPRECATED: The docker/export task has been deprecated since version 0.15.0. Use the convey/export task instead.
This task will export files from the workspace to the host filesystem relative
to the convey.yml
used for the run.
Attributes
Name | Required | Default | Description |
---|---|---|---|
files | Yes | A single filename, source:destination, or a list of filenames and/or source:destinations. |
Examples
export-single:
type: docker/export
files: filename1
export-multiple:
type: docker/export
files:
- logo.png
- binary:binary-linux-x86_64
docker/import
DEPRECATED: The docker/import task has been deprecated since version 0.15.0. Use the convey/import task instead.
This task will import files from the host filesystem relative to the
convey.yml
used for the run and put them into the workspace.
Attributes
Name | Required | Default | Description |
---|---|---|---|
files | Yes | A single filename, source:destination, or a list of filenames and/or source:destinations. |
Examples
import-single:
type: docker/import
files: filename1
import-multiple:
type: docker/import
files:
- Dockerfile
- src:source
docker/login
DEPRECATED: The docker/login task has been deprecated since version 0.15.0. Use the podman/login task instead.
This task allows you to authorize to a container registry.
Attributes
Name | Required | Default | Description |
---|---|---|---|
username | Yes | The username to use. | |
password | Yes | The password to use. | |
server | docker.io | The registry to login to. |
Example
registry-login:
type: docker/login
username: superuser1
password: abc123
docker/logout
DEPRECATED: The docker/logout task has been deprecated since version 0.15.0. Use the podman/logout task instead.
This task allows you to unauthenticate from a container registry.
Attributes
Name | Required | Default | Description |
---|---|---|---|
server | docker.io | The registry to logout of. |
Example
registry-logout:
type: docker/logout
server: registry.my.domain:5000
docker/pull
DEPRECATED: The docker/pull task has been deprecated since version 0.15.0. Use the podman/pull task instead.
This task allows you to pull down a container image. If the image is private,
be sure to run a docker/login
task first.
Attributes
Name | Required | Default | Description |
---|---|---|---|
image | The name of the image including the tag. | ||
images | A list of image names including the tags. |
At least one image must be supplied by either the image
or images
attribute. If both are specified, image
will be prepended to the list from
images
.
Example
pull-alpine:
type: docker/pull
image: gliderlabs/alpine:edge
docker/push
DEPRECATED: The docker/push task has been deprecated since version 0.15.0. Use the podman/push task instead.
This task allows you to push a local container image to a registry. If the
repository on the registry is private, be sure to run a docker/login
task
first.
Attributes
Name | Required | Default | Description |
---|---|---|---|
image | The name of the image including the tag. | ||
images | A list of image names including the tags. |
At least one image must be supplied by either the image
or images
attribute. If both are specified, image
will be prepended to the list from
images
.
Example
push-images:
type: docker/push
images:
- registry.my.domain:5000/newimage:main-latest
- registry.my.domain:5000/newimage:main-deadbeef
docker/remove
DEPRECATED: The docker/remove task has been deprecated since version 0.15.0. Use the podman/remove task instead.
This task will remove an image from the local machine.
Attributes
Name | Required | Default | Description |
---|---|---|---|
image | The name of the image including the tag. | ||
images | A list of image names including the tags. | ||
quiet | false | True if a missing image should not count as a failure. |
Example
remove-image:
type: docker/remove
images:
- registry.my.domain:5000/newimage:main-latest
- registry.my.domain:5000/newimage:main-deadbeef
docker/run
DEPRECATED: The docker/run task has been deprecated since version 0.15.0. Use the podman/run task instead.
This task will run a container with the workspace mounted.
Attributes
NOTE: the detach and healthcheck attributes are not mapped to the podman/run task and are not expected to be in the future. If you have a use case for this, please open an issue on our issue tracker.
Name | Required | Default | Description |
---|---|---|---|
command | The command to run in the container. This is only necessary if the image does not provide a command by default. | ||
detach | false | This is deprecated and no longer supported. | |
entrypoint | The entrypoint to use for the container. This is only necessary if the image does not provide one by default or if you want to override the image's default entrypoint. | ||
environment | A list of environment variables to set. This should be specified in a NAME or NAME=VALUE format. |
||
healthcheck | This is deprecated and no longer supported. | ||
hostname | A custom hostname to set inside the container. | ||
image | Yes | The image including the registry and tag to run. | |
labels | A list of labels to set on the image being run. | ||
script | A list of commands to run inside of the container. | ||
shell | The shell to use with the script attribute above. | ||
user | The user to run the container as. | ||
workdir | The working directory inside the container. | ||
workspace | The path to mount the convey workspace at inside of the container. |
Example
A basic example where the image knows everything to do.
build-golang:
type: docker/run
image: golang:onbuild
A basic example using a standard image to do something else.
download-file:
type: docker/run
image: debian:jessie-slim
script:
- wget https://somedomain.tld/file1
- wget https://somedomain.tld/file1.sha256sum
- sha256sum -c file1.sha256sum
docker/tag
DEPRECATED: The docker/tag task has been deprecated since version 0.15.0. Use the podman/tag task instead.
This task will tag existing images on the host.
Attributes
Name | Required | Default | Description |
---|---|---|---|
source | Yes | The full source image including the registry and tag to tag. | |
destination | Yes | The destination tag including the registry and tag to create. |
Example
tag-dev:
type: docker/tag
source: registry.my.domain:5000/newimage:latest
destination: registry.my.domain:5000/newimage:dev