Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
08a38b71
Commit
08a38b71
authored
Oct 03, 2018
by
Valerio Baldisserotto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change path where to create the config.json file
parent
2d33579c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
doc/ci/docker/using_kaniko.md
doc/ci/docker/using_kaniko.md
+2
-3
No files found.
doc/ci/docker/using_kaniko.md
View file @
08a38b71
...
...
@@ -39,7 +39,7 @@ few important details:
In the following example, kaniko is used to build a Docker image and then push
it to
[
GitLab Container Registry
](
../../user/project/container_registry.md
)
.
The job will run only when a tag is pushed. A
`config.json`
file is created under
`/
root
/.docker`
with the needed GitLab Container Registry credentials taken from the
`/
kaniko
/.docker`
with the needed GitLab Container Registry credentials taken from the
[
environment variables
](
../variables/README.md#predefined-variables-environment-variables
)
GitLab CI/CD provides. In the last step, kaniko uses the
`Dockerfile`
under the
root directory of the project, builds the Docker image and pushes it to the
...
...
@@ -52,8 +52,7 @@ build:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
script
:
-
mkdir -p /root/.docker
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
only
:
-
tags
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment