@@ -13,12 +13,18 @@ from a Dockerfile at the root of your project, and push it to a remote registry
1. Create a
[Dockerfile](https://docs.docker.com/get-started/part2/#sample-dockerfile){:target="_blank"} (by default at the root of your project)
to containerize your application
1. Copy/paste job URL in`include` list of your `.gitlab-ci.yml` (see the [quick setup](/use-the-hub/#quick-setup)). You can specify [a fixed version](#changelog) instead of `latest`.
1. Copy the job URL located in the `Install` part of the right panel and add it inside the`include` list of your `.gitlab-ci.yml`file (see the [quick setup](/use-the-hub/#quick-setup)). You can specify [a fixed version](#changelog) instead of `latest`.
4. If you need to customize the job (stage, variables, ...) 👉 check the [jobs
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)
| `CUSTOM_TAG` | If you want a specific tag for your image | ` `|
| Name | Description | Default |
| ---- | ----------- | -------|
| `CUSTOM_TAGS`<imgwidth=100/> | Add one or mor specific tag for your image. each tag are separated with space. <imgwidth=175/>| ` `<imgwidth=100/>|
| `COMMIT_CREATE_LATEST` | In a commit context, also update `latest` tag | `false` |
| `TAG_CREATE_LATEST` | In a tag context, also update `latest` tag | `true` |
| `DOCKER_CONTEXT_PATH` | Path of build context from to repository root | ` ` |
| `DOCKERFILE_PATH` | Path to Dockerfile from the build context (see `DOCKER_CONTEXT_PATH`) | `Dockerfile` |
| `DOCKER_USE_CACHE` | Cache Dockerfile layers. Cached layers are stored in the [container registry](https://docs.gitlab.com/ee/user/packages/container_registry/){:target="_blank"} in `/cache` repository| `false` |
| `DOCKER_SNAPSHOT_MODE` | Flag to set how kaniko will snapshot the filesystem. With `redo`, may be 50% faster than default, as described in the [doc](https://github.com/GoogleContainerTools/kaniko#--snapshotmode). | `redo` |
| `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"} | ` ` |
@@ -74,5 +81,5 @@ The registry and tag of the resulting Docker image follow this behavior:
## Author
### Author
This resource is an **[official job](https://docs.r2devops.io/faq-labels/)** added in [**R2Devops repository**](https://gitlab.com/r2devops/hub) by [@thomasboni](https://gitlab.com/thomasboni)