@@ -37,24 +36,20 @@ remote registry. The build part is done using
The registry and tag of the resulting Docker image follow this behavior:
| `CUSTOM_REGISTRY` used ? <imgwidth=10/> | `CUSTOM_TAG` used ? | Are you pushing git tag ? | Registry where image is pushed | Docker tag applied to the image |
|:-|:-|:-|:-|:-
| No | No | No | Gitlab project registry | Last commit SHA |
| No | No | Yes | Gitlab project registry | Git tag name |
| No | Yes | No | Gitlab project registry | `CUSTOM_TAG` |
In order to use custom registries, you need to provide the file `config.json` that contains the auths, you can do that by passing it as a [CI/CD file](https://docs.gitlab.com/ee/ci/variables/#cicd-variable-types){:target="_blank"} named `CONFIG_FILE` (see example below)
### Variables
| VARIABLE NAME | DESCRIPTION | DEFAULT VALUE |
|:-|:-|:-
| `CUSTOM_REGISTRY`<imgwidth=100/> | If you want to use another registry than the Gitlab one | ` ` |
| `REGISTRY_USER` | To authenticate with the `CUSTOM_REGISTRY` | ` ` |
| `REGISTRY_PASSWORD` | To authenticate with the `CUSTOM_REGISTRY` | ` ` |
| `CUSTOM_TAG` | If you want a specific tag for your image | ` ` |
| `COMMIT_CREATE_LATEST` | In a commit context, also update `latest` tag | `false` |
| `TAG_CREATE_LATEST` | In a tag context, also update `latest` tag | `true` |
@@ -64,3 +59,20 @@ The registry and tag of the resulting Docker image follow this behavior:
| `DOCKER_VERBOSITY` | Set the verbosity of the build in job's log (see [levels](https://github.com/GoogleContainerTools/kaniko#--verbosity){:target="_blank"}) | `info` |
| `DOCKER_OPTIONS` | If you want to use additional [options](https://github.com/GoogleContainerTools/kaniko#additional-flags){:target="_blank"} | ` ` |
| `CUSTOM_REGISTRIES_DESTINATIONS` | the list of your remote registries + image tags (see example below) | ` ` |
| `CONFIG_FILE` | CI variable file that contains the auths for kaniko | ` ` |
* Example of variable `CUSTOM_REGISTRIES_DESTINATIONS`: