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
1b4c80cc
Commit
1b4c80cc
authored
Jul 27, 2021
by
Aaron Peckham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change kaniko/config.json to auth with base64 instead of username and password
parent
8b7df8d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
doc/ci/docker/using_kaniko.md
doc/ci/docker/using_kaniko.md
+3
-3
No files found.
doc/ci/docker/using_kaniko.md
View file @
1b4c80cc
...
...
@@ -64,7 +64,7 @@ build:
entrypoint
:
[
"
"
]
script
:
-
mkdir -p /kaniko/.docker
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"
username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD
\"}}}" > /kaniko/.docker/config.json
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"
auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64)
\"}}}" > /kaniko/.docker/config.json
-
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
rules
:
-
if
:
$CI_COMMIT_TAG
...
...
@@ -91,7 +91,7 @@ build:
-
mkdir -p /kaniko/.docker
-
|-
KANIKOPROXYBUILDARGS=""
KANIKOCFG="{
\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"
}}"
KANIKOCFG="{
\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64)\"}
}}"
if [ "x${http_proxy}" != "x" -o "x${https_proxy}" != "x" ]; then
KANIKOCFG="${KANIKOCFG}, \"proxies\": { \"default\": { \"httpProxy\": \"${http_proxy}\", \"httpsProxy\": \"${https_proxy}\", \"noProxy\": \"${no_proxy}\"}}"
KANIKOPROXYBUILDARGS="--build-arg http_proxy=${http_proxy} --build-arg https_proxy=${https_proxy} --build-arg no_proxy=${no_proxy}"
...
...
@@ -120,7 +120,7 @@ store:
```
yaml
before_script
:
-
mkdir -p /kaniko/.docker
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"
username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD
\"}}}" > /kaniko/.docker/config.json
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"
auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64)
\"}}}" > /kaniko/.docker/config.json
-
|
echo "-----BEGIN CERTIFICATE-----
...
...
...
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