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
6c4d13fe
Commit
6c4d13fe
authored
Aug 28, 2017
by
Tomasz Maczukin
Committed by
Achilleas Pipinellis
Aug 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 'Using Docker images' documentation
parent
d1eda393
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
7 deletions
+38
-7
changelogs/unreleased/docs-update-ci-docker-using-docker-images.yml
.../unreleased/docs-update-ci-docker-using-docker-images.yml
+5
-0
doc/ci/docker/using_docker_images.md
doc/ci/docker/using_docker_images.md
+33
-7
No files found.
changelogs/unreleased/docs-update-ci-docker-using-docker-images.yml
0 → 100644
View file @
6c4d13fe
---
title
:
Update 'Using Docker images' documentation
merge_request
:
13848
author
:
type
:
other
doc/ci/docker/using_docker_images.md
View file @
6c4d13fe
...
...
@@ -388,15 +388,40 @@ that runner.
As an example, let's assume that you want to use the
`registry.example.com/private/image:latest`
image which is private and requires you to login into a private container registry.
Let's also assume that these are the login credentials:
| Key | Value |
|----------|----------------------|
| registry | registry.example.com |
| username | my_username |
| password | my_password |
To configure access for
`registry.example.com`
, follow these steps:
1.
Do a
`docker login`
on your computer:
1.
Find what the value of
`DOCKER_AUTH_CONFIG`
should be. There are two ways to
accomplish this:
-
**First way -**
Do a
`docker login`
on your local machine:
```bash
docker login registry.example.com --username my_username --password my_password
```
1.
Copy the content of
`~/.docker/config.json`
Then copy the content of `~/.docker/config.json`.
- **Second way -** In some setups, it's possible that Docker client will use
the available system keystore to store the result of `docker login`. In
that case, it's impossible to read `~/.docker/config.json`, so you will
need to prepare the required base64-encoded version of
`${username}:${password}` manually. Open a terminal and execute the
following command:
```bash
echo -n "my_username:my_password" | base64
# Example output to copy
bXlfdXNlcm5hbWU6bXlfcGFzc3dvcmQ=
```
1.
Create a [secret variable]
`DOCKER_AUTH_CONFIG`
with the content of the
Docker configuration file as the value:
...
...
@@ -410,7 +435,8 @@ To configure access for `registry.example.com`, follow these steps:
}
```
1.
Do a
`docker logout`
on your computer if you don't need access to the
1.
Optionally,if you followed the first way of finding the
`DOCKER_AUTH_CONFIG`
value, do a
`docker logout`
on your computer if you don't need access to the
registry from it:
```bash
...
...
@@ -418,7 +444,7 @@ To configure access for `registry.example.com`, follow these steps:
```
1.
You can now use any private image from
`registry.example.com`
defined in
`image`
and/or
`services`
in your
[
`.gitlab-ci.yml` file
][
yaml-priv-reg
]
:
`image`
and/or
`services`
in your
`.gitlab-ci.yml`
file
:
```yaml
image: my.registry.tld:5000/namespace/image:tag
...
...
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