Skip to content

Commit e2b8337

Browse files
committed
Merge branch 'doc-edit-config-file-path-kaniko' into 'master'
Docs: Change path where to create the config.json file when using kaniko See merge request gitlab-org/gitlab-ce!22075
2 parents 2620974 + 08a38b7 commit e2b8337

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

doc/ci/docker/using_kaniko.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ few important details:
3939
In the following example, kaniko is used to build a Docker image and then push
4040
it to [GitLab Container Registry](../../user/project/container_registry.md).
4141
The job will run only when a tag is pushed. A `config.json` file is created under
42-
`/root/.docker` with the needed GitLab Container Registry credentials taken from the
42+
`/kaniko/.docker` with the needed GitLab Container Registry credentials taken from the
4343
[environment variables](../variables/README.md#predefined-variables-environment-variables)
4444
GitLab CI/CD provides. In the last step, kaniko uses the `Dockerfile` under the
4545
root directory of the project, builds the Docker image and pushes it to the
@@ -52,8 +52,7 @@ build:
5252
name: gcr.io/kaniko-project/executor:debug
5353
entrypoint: [""]
5454
script:
55-
- mkdir -p /root/.docker
56-
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json
55+
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
5756
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
5857
only:
5958
- tags

0 commit comments

Comments
 (0)