Commit 351e894c authored by Steve Abrams's avatar Steve Abrams Committed by Suzanne Selhorn

Update Dependency Proxy docs with port notes

Warn users about port explicity when using the
predefined environment variables in the Dependency
Proxy docs.
parent c930f24b
...@@ -117,6 +117,12 @@ dependency-proxy-pull-master: ...@@ -117,6 +117,12 @@ dependency-proxy-pull-master:
- docker pull "$CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX"/alpine:latest - 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. 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` ##### Authenticate with `DOCKER_AUTH_CONFIG`
...@@ -155,11 +161,23 @@ named `DOCKER_AUTH_CONFIG` with a value of: ...@@ -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: 1. Now reference the Dependency Proxy in your base image:
```yaml ```yaml
# .gitlab-ci.yml # .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