Commit e503a021 authored by Suzanne Selhorn's avatar Suzanne Selhorn

Merge branch 'sabrams/dp-doc-port-update' into 'master'

Update Dependency Proxy docs with port notes

See merge request gitlab-org/gitlab!50168
parents 1f42d324 351e894c
......@@ -117,6 +117,12 @@ dependency-proxy-pull-master:
- docker pull "$CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX"/alpine:latest
```
`CI_DEPENDENCY_PROXY_SERVER` and `CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX` include the server port. So if you use `CI_DEPENDENCY_PROXY_SERVER` to log in, for example, you must explicitly include the port in your pull command and vice-versa:
```shell
docker pull gitlab.example.com:443/my-group/dependency_proxy/containers/alpine:latest
```
You can also use [custom environment variables](../../../ci/variables/README.md#custom-environment-variables) to store and access your personal access token or other valid credentials.
##### Authenticate with `DOCKER_AUTH_CONFIG`
......@@ -155,11 +161,23 @@ named `DOCKER_AUTH_CONFIG` with a value of:
}
```
To use `$CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX` when referencing images, you must explicitly include the port in your `DOCKER_AUTH_CONFIG` value:
```json
{
"auths": {
"https://gitlab.example.com:443": {
"auth": "(Base64 content from above)"
}
}
}
```
1. Now reference the Dependency Proxy in your base image:
```yaml
# .gitlab-ci.yml
image: "$CI_SERVER_HOST":"$CI_SERVER_PORT"/groupname/dependency_proxy/containers/node:latest
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/node:latest
...
```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment