definition of customized tag names.
name of the new customized tag, which can be referred in a tag template.
type of the new customized tag which produces a tag name based on the value of value
field, choices include:
datetime
cmd
argument passed to the tag name generator specified by the type
field:
- for
datetime
type, value is a Python datetime formatter, e.g '%Y%m%d%H%M'(ref datetime.strftime). - for
cmd
type, value is a shell command, e.g.echo hello-world
.
definition of docker-builds
and their relationships.
names for your build.
path to build context, relative to the root of the repo.
Dockerfile for the build, relative to the context.
List of build arguments.
Each argument should be provided in "ARG=VALUE"
form.
pushing rule for the built image, a single rule is composed in a form of '<push_mode>=<\repo>:<tag_template>', in which:
-
push_mode
defines when to push, choices include:always
: always push the successfully built image.on_tag
: push if built on a git tag.on_branch:<branchname>
: push if built on branchbranchname
-
repo
defines which repo to push to. -
tag_template
is a python formattable string for generating the image tag, available template variables include:date
: date of the built(e.g, 20160617)scommitid
: a 7-char trunc of the corresponding git sha-1 commit id.fcommitid
: full git commit id.git_tag
: git tag name (if built on a git tag)git_branch
: git branch name(if built on a git branch)
files or directories you want ignore in the context, during docker build
ref: dockerignore
define labels applied to built image, each item should be with format '=""', with <value>
being a python template string, available template variables include:
scommitid
: a 7-char trunc of the corresponding git sha-1 commit id.fcommitid
: full git commit id.git_tag
: git tag name (if built on a git tag)git_branch
: git branch name(if built on a git branch)
which builds this build depends on, docker-make
will build the depends first.
define a list of source-destination pairs, with source
point to a path of the newly built image, and destination
being a filename on the host, docker-make
will package source
in a tar file, and copy the tar file to destination
. Each item's syntax is similar to docker run -v
a build's name which should be available in .docker-make.yml
, if supplied, docker-make
will build rewrite_from
first, and replace current build's Dockerfile's FROM
with rewrite_from
's fresh image id.