Tracks and builds Docker images.
-
repository
: Required. The name of the repository, e.g.concourse/docker-image-resource
. -
tag
: Optional. The tag to track. Defaults tolatest
. -
username
: Optional. The username to authenticate with when pushing. -
password
: Optional. The password to use when authenticating. -
email
: Optional. The email to use when authenticating. -
insecure_registries
: Optional. An array of CIDRs orhost:port
addresses to whitelist for insecure access (eitherhttp
or unverifiedhttps
).
The current image digest is fetched from the registry for the given tag of the repository. If it's different from the current version, it is returned.
Pulls down the repository image by the requested digest.
The following files will be placed in the destination:
/image
: Ifsave
istrue
, thedocker save
d image will be provided here./repository
: The name of the repository that was fetched./tag
: The tag of the repository that was fetched./image-id
: The fetched image ID./digest
: The fetched image digest./rootfs.tar
: Ifrootfs
istrue
, the contents of the image will be provided here.
save
: Optional. Place adocker save
d image in the destination.rootfs
: Optional. Place a.tar
file of the image in the destination.skip_download
: Optional. Skipdocker pull
of image. Only/image-id
,/repository
, and/tag
will be populated./image
and/rootfs.tar
will not be present.
Push a Docker image to the source's repository and tag. The resulting version is the image's digest.
-
rootfs
: Optional. Defaultfalse
. Place a.tar
file of the image in the destination. -
build
: Optional. The path of a directory containing aDockerfile
to build. -
dockerfile
: Optional. The path of theDockerfile
in the directory if it's not at the root of the directory. -
cache
: Optional. Defaultfalse
. When thebuild
parameter is set, first pullimage:tag
from the Docker registry (so as to use cached intermediate images when building). This will cause the resource to fail if it is set totrue
and the image does not exist yet. -
load_base
: Optional. A path to a directory containing an image todocker load
before runningdocker build
. The directory must haveimage
,image-id
,repository
, andtag
present, i.e. the tree produced by/in
. -
load_file
: Optional. A path to a file todocker load
and then push. -
import_file
: Optional. A path to a file todocker import
and then push. -
pull_repository
: Optional. A path to a repository to pull down, and then push to this resource. -
tag
: Optional. The value should be a path to a file containing the name of the tag. -
tag_prefix
: Optional. If specified, the tag read from the file will be prepended with this string. This is useful for addingv
in front of version numbers. -
tag_as_latest
: Optional. Defaultfalse
. If true, the pushed image will be tag as latest too and tag will be push.
resources:
- name: git-resource
type: git
source: # ...
- name: git-resource-image
type: docker-image
source:
repository: concourse/git-resource
email: [email protected]
username: username
password: password
- name: git-resource-rootfs
type: s3
source: # ...
jobs:
- name: build-rootfs
plan:
- get: git-resource
- put: git-resource-image
params: {build: git-resource}
get_params: {rootfs: true}
- put: git-resource-rootfs
params: {file: git-resource-image/rootfs.tar}