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

Argument Type Description Sample values
dockerfile Required string Dockerfile path in the target Dockerfile
--write Optional path Writable path where the built image will be stored as a TAR archive /builds/results/image.tar
--image Optional string, defaults to randomized taskboot-XXX Docker image name applied on the built image. No tag must be specified here. my-project/backend
--registry Optional string, defaults to env variable REGISTRY or registry.hub.docker.com if not set Sets the registry used to tag the images produced. Useful when combining with push-artifact registry.hub.docker.com
--tag Optional multiple strings, defaults to latest Docker tags applied on the built image --tag=latest --tag=1.2.3
--push Boolean switch Push on the configured repository, using the specified tag with --tag
--build-arg Optional multiple KEY=VALUE strings Build 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