Skip to content
Boris Feld edited this page Jun 7, 2019 · 6 revisions

The build command allows you to build and optionally push a single docker image.

⚠️ The image is built using img, and not an official Docker release, but every Dockerfile should be processed successfully.

Arguments

ArgumentTypeDescriptionSample values
dockerfileRequired stringDockerfile path in the targetDockerfile
--writeOptional pathWritable path where the built image will be stored as a TAR archive/builds/results/image.tar
--imageOptional string, defaults to randomized taskboot-XXXDocker image name applied on the built image. No tag must be specified here.my-project/backend
--registryOptional string, defaults to env variable REGISTRY or registry.hub.docker.com if not setSets the registry used to tag the images produced. Useful when combining with push-artifactregistry.hub.docker.com
--tagOptional multiple strings, defaults to latestDocker tags applied on the built image--tag=latest --tag=1.2.3
--pushBoolean switchPush on the configured repository, using the specified tag with --tag
--build-argOptional multiple KEY=VALUE stringsBuild arguments provided to each Docker image built.BACKEND_VERSION=1.2.3

Taskcluster integration

As this command builds a Docker image, you will need the following:

  • scope docker-worker:capability:privileged on your task
  • a worker type that can use the privileged capability (ask a #taskcluster admin)
  • request the priviliged state in your task payload:
payload:
capabilities:
privileged: true

Clone this wiki locally