diff --git a/plugins/docker/readme.md b/plugins/docker/readme.md index e0cbc4498..eb6f36f77 100644 --- a/plugins/docker/readme.md +++ b/plugins/docker/readme.md @@ -24,11 +24,11 @@ plugins: 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](https://docs.docker.com/build/building/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` | `{}` | -| `secrets` |
An array of Docker [secrets](https://docs.docker.com/build/building/secrets/) to include when building the image.
Each item in the array will add `--secret id=[id],source=[source]` to the docker build script. Docker can embed
secret environment variables such as `NPM_TOKEN` (type: env) and secret files such as `.npmrc` (type: file)`.
You can also include a secret environment variable by adding an item with just the environment name.
| `Array
  • id: string
  • type: 'file' \| 'env'
  • source: string
  • >` | `[]` | +| 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](https://docs.docker.com/build/building/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` | `{}` | +| `secrets` |
    An array of Docker [secrets](https://docs.docker.com/build/building/secrets/) to include when building the image.
    Each item in the array will add `--secret id=[id],src=[src]` to the docker build script. Docker can embed
    secret environment variables such as `NPM_TOKEN` (type: env) and secret files such as `.npmrc` (type: file)`.
    You can also include a secret environment variable by adding an item with just the environment name.
    | `Array
  • id: string
  • type: 'file' \| 'env'
  • src: string
  • >` | `[]` | _All properties are optional._ diff --git a/plugins/docker/src/tasks/build.ts b/plugins/docker/src/tasks/build.ts index c4579b45f..d04c1b65c 100644 --- a/plugins/docker/src/tasks/build.ts +++ b/plugins/docker/src/tasks/build.ts @@ -30,7 +30,7 @@ const DockerBuildSchema = z z.object({ id: z.string(), type: z.union([z.literal('file'), z.literal('env')]).optional(), - source: z.string().optional() + src: z.string().optional() }) ]) ) @@ -38,7 +38,7 @@ const DockerBuildSchema = z .describe( ` An array of Docker [secrets](https://docs.docker.com/build/building/secrets/) to include when building the image. - Each item in the array will add \`--secret id=[id],source=[source]\` to the docker build script. Docker can embed + Each item in the array will add \`--secret id=[id],src=[src]\` to the docker build script. Docker can embed secret environment variables such as \`NPM_TOKEN\` (type: env) and secret files such as \`.npmrc\` (type: file)\`. You can also include a secret environment variable by adding an item with just the environment name. `