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
11460c4a
Commit
11460c4a
authored
Oct 02, 2018
by
Drew Blessing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add note that hostname:port need to match for `DOCKER_AUTH_CONFIG`
parent
9087964c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
13 deletions
+19
-13
doc/ci/docker/using_docker_images.md
doc/ci/docker/using_docker_images.md
+19
-13
No files found.
doc/ci/docker/using_docker_images.md
View file @
11460c4a
...
@@ -461,25 +461,25 @@ that runner.
...
@@ -461,25 +461,25 @@ that runner.
> - If the repository is private you need to authenticate your GitLab Runner in the
> - If the repository is private you need to authenticate your GitLab Runner in the
> registry. Learn more about how [GitLab Runner works in this case][runner-priv-reg].
> registry. Learn more about how [GitLab Runner works in this case][runner-priv-reg].
As an example, let's assume that you want to use the
`registry.example.com/private/image:latest`
As an example, let's assume that you want to use the
`registry.example.com
:5000
/private/image:latest`
image which is private and requires you to login into a private container registry.
image which is private and requires you to login into a private container registry.
Let's also assume that these are the login credentials:
Let's also assume that these are the login credentials:
| Key | Value |
| Key | Value
|
|----------|----------------------|
|----------|----------------------
-----
|
| registry | registry.example.com |
| registry | registry.example.com
:5000
|
| username | my_username |
| username | my_username
|
| password | my_password |
| password | my_password
|
To configure access for
`registry.example.com`
, follow these steps:
To configure access for
`registry.example.com
:5000
`
, follow these steps:
1.
Find what the value of
`DOCKER_AUTH_CONFIG`
should be. There are two ways to
1.
Find what the value of
`DOCKER_AUTH_CONFIG`
should be. There are two ways to
accomplish this:
accomplish this:
-
**First way -**
Do a
`docker login`
on your local machine:
-
**First way -**
Do a
`docker login`
on your local machine:
```bash
```bash
docker login registry.example.com --username my_username --password my_password
docker login registry.example.com
:5000
--username my_username --password my_password
```
```
Then copy the content of `~/.docker/config.json`.
Then copy the content of `~/.docker/config.json`.
...
@@ -503,7 +503,7 @@ To configure access for `registry.example.com`, follow these steps:
...
@@ -503,7 +503,7 @@ To configure access for `registry.example.com`, follow these steps:
```json
```json
{
{
"auths": {
"auths": {
"registry.example.com": {
"registry.example.com
:5000
": {
"auth": "bXlfdXNlcm5hbWU6bXlfcGFzc3dvcmQ="
"auth": "bXlfdXNlcm5hbWU6bXlfcGFzc3dvcmQ="
}
}
}
}
...
@@ -515,22 +515,28 @@ To configure access for `registry.example.com`, follow these steps:
...
@@ -515,22 +515,28 @@ To configure access for `registry.example.com`, follow these steps:
registry from it:
registry from it:
```bash
```bash
docker logout registry.example.com
docker logout registry.example.com
:5000
```
```
1.
You can now use any private image from
`registry.example.com`
defined in
1.
You can now use any private image from
`registry.example.com
:5000
`
defined in
`image`
and/or
`services`
in your
`.gitlab-ci.yml`
file:
`image`
and/or
`services`
in your
`.gitlab-ci.yml`
file:
```yaml
```yaml
image:
my.registry.tld
:5000/namespace/image:tag
image:
registry.example.com
:5000/namespace/image:tag
```
```
In the example above, GitLab Runner will look at `
my.registry.tld
:5000` for the
In the example above, GitLab Runner will look at `
registry.example.com
:5000` for the
image `namespace/image:tag`.
image `namespace/image:tag`.
You can add configuration for as many registries as you want, adding more
You can add configuration for as many registries as you want, adding more
registries to the
`"auths"`
hash as described above.
registries to the
`"auths"`
hash as described above.
NOTE:
**Note:**
The full
`hostname:port`
combination is required everywhere
for the Runner to match the
`DOCKER_AUTH_CONFIG`
. For example, if
`registry.example.com:5000/namespace/image:tag`
is specified in
`.gitlab-ci.yml`
,
then the
`DOCKER_AUTH_CONFIG`
must also specify
`registry.example.com:5000`
.
Specifying only
`registry.example.com`
will not work.
## Configuring services
## Configuring services
Many services accept environment variables which allow you to easily change
Many services accept environment variables which allow you to easily change
...
...
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