Skip to content
GitLab
Next
Projects
Groups
Snippets
Help
Loading...
Help
See what's new at GitLab
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gitlab-runner
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1,983
Issues
1,983
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
216
Merge Requests
216
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GitLab.org
gitlab-runner
Commits
0199e1f1
Verified
Commit
0199e1f1
authored
Jun 05, 2019
by
Andrei Burd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
After review commit
parent
dbfa7773
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
15 deletions
+6
-15
docs/configuration/advanced-configuration.md
docs/configuration/advanced-configuration.md
+0
-13
helpers/docker/auth_config.go
helpers/docker/auth_config.go
+6
-2
No files found.
docs/configuration/advanced-configuration.md
View file @
0199e1f1
...
...
@@ -319,19 +319,6 @@ you can set the authorization configuration in the `DOCKER_AUTH_CONFIG`
[variable]. It can be set in both GitLab Variables section of
a project and in the
`config.toml`
file.
Docker credentials helper can be configured using
`config.json`
file in
`.docker`
folder
in runner's home directory, if you are using self hosted runners:
```
json
{
"credHelpers"
:
{
"aws_account_id.dkr.ecr.region-1.amazonaws.com"
:
"ecr-login"
,
"aws_account_id.dkr.ecr.region-2.amazonaws.com"
:
"ecr-login"
,
"gcr.io"
:
"gcr"
}
}
```
For a detailed example, visit the
[
Using Docker images documentation
][
priv-example
]
.
The steps performed by the Runner can be summed up to:
...
...
helpers/docker/auth_config.go
View file @
0199e1f1
...
...
@@ -114,30 +114,34 @@ func ReadAuthConfigsFromReader(r io.Reader) (map[string]types.AuthConfig, error)
}
addAll
(
auths
,
authsFromCredentialsHelpers
)
}
return
auths
,
nil
}
func
readAuthConfigsFromCredentialsStore
(
config
*
configfile
.
ConfigFile
)
(
map
[
string
]
types
.
AuthConfig
,
error
)
{
store
:=
credentials
.
NewNativeStore
(
config
,
config
.
CredentialsStore
)
newAuths
,
err
:=
store
.
GetAll
()
if
err
!=
nil
{
return
nil
,
err
}
return
newAuths
,
nil
}
func
readAuthConfigsFromCredentialsHelper
(
config
*
configfile
.
ConfigFile
)
(
map
[
string
]
types
.
AuthConfig
,
error
)
{
helpersAuths
:=
make
(
map
[
string
]
types
.
AuthConfig
)
for
registry
,
helper
:=
range
config
.
CredentialHelpers
{
store
:=
credentials
.
NewNativeStore
(
config
,
helper
)
newAuths
,
err
:=
store
.
Get
(
registry
)
if
err
!=
nil
{
return
nil
,
err
}
helpersAuths
[
registry
]
=
newAuths
}
return
helpersAuths
,
nil
}
...
...
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