@dotcom-tool-kit/docker
v1.1.1
Published
With Tool Kit [already set up](https://github.com/financial-times/dotcom-tool-kit#installing-and-using-tool-kit), install this plugin as a dev dependency:
Downloads
1,776
Readme
@dotcom-tool-kit/docker
Installation & Usage
With Tool Kit already set up, install this plugin as a dev dependency:
npm install --save-dev @dotcom-tool-kit/dockerAnd add it to your repo's .toolkitrc.yml:
plugins:
- '@dotcom-tool-kit/docker'Tasks
DockerBuild
Run docker build to create Docker images.
Task options
| Property | Description | Type | Default |
| :---------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- | :------ |
| ssh | whether to forward host's SSH agent, see https://docs.docker.com/reference/cli/docker/buildx/build/#ssh | boolean | false |
| buildArgs | An object of Docker build variables to include when building the image. To use values from Tool Kit's environment (since we usually build Docker images on CircleCI, this would be the CI environment), you can use the !toolkit/env tag, e.g. buildArgs: { GIT_COMMIT: !toolkit/env "GIT_COMMIT" } | Record<string, string> | {} |
All properties are optional.
Plugin-wide options
@dotcom-tool-kit/docker
| Property | Type |
| :---------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| images (*) | Object with dynamic keys of type string and values of type Object with properties:definition: string - The path to the Dockerfile definition file for this imageplatform: string - The platform to target when building the Docker image, e.g. linux/arm64 or linux/amd64registry: string - The registry that the Docker image is pushed to, excluding name and tagname: string (regex: /^[a-z][a-z-]+$/) - The name of the image, excluding a tag |
(*) Required.
