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
650f7af8
Commit
650f7af8
authored
Jun 23, 2021
by
Duncan Harris
Committed by
Nick Gaskill
Jun 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding DIND + Dependency Proxy
parent
6f593b85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
doc/user/packages/container_registry/index.md
doc/user/packages/container_registry/index.md
+30
-0
doc/user/packages/dependency_proxy/index.md
doc/user/packages/dependency_proxy/index.md
+18
-0
No files found.
doc/user/packages/container_registry/index.md
View file @
650f7af8
...
...
@@ -332,6 +332,36 @@ If you forget to set the service alias, the `docker:19.03.12` image is unable to
error during connect: Get http://docker:2376/v1.39/info: dial tcp: lookup docker on 192.168.0.1:53: no such host
```
### Using a Docker-in-Docker image with Dependency Proxy
To use your own Docker images with Dependency Proxy, follow these steps
in addition to the steps in the
[
Docker-in-Docker
](
../../../ci/docker/using_docker_build.md#use-the-docker-executor-with-the-docker-image-docker-in-docker
)
section:
1.
Update the
`image`
and
`service`
to point to your registry.
1.
Add a service
[
alias
](
../../../ci/yaml/README.md#servicesalias
)
.
Below is an example of what your
`.gitlab-ci.yml`
should look like:
```
yaml
build
:
image
:
${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/group/project/docker:19.03.12
services
:
-
name
:
${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/docker:18.09.7-dind
alias
:
docker
stage
:
build
script
:
-
docker build -t my-docker-image .
-
docker run my-docker-image /script/to/run/tests
```
If you forget to set the service alias, the
`docker:19.03.12`
image is unable to find the
`dind`
service, and an error like the following is thrown:
```
plaintext
error during connect: Get http://docker:2376/v1.39/info: dial tcp: lookup docker on 192.168.0.1:53: no such host
```
## Delete images
You can delete images from your Container Registry in multiple ways.
...
...
doc/user/packages/dependency_proxy/index.md
View file @
650f7af8
...
...
@@ -252,3 +252,21 @@ hub_docker_quota_check:
-
|
TOKEN=$(curl "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq --raw-output .token) && curl --head --header "Authorization: Bearer $TOKEN" "https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest" 2>&1
```
## Troubleshooting
### Dependency Proxy Connection Failure
If a service alias is not set the
`docker:19.03.12`
image is unable to find the
`dind`
service, and an error like the following is thrown:
```
plaintext
error during connect: Get http://docker:2376/v1.39/info: dial tcp: lookup docker on 192.168.0.1:53: no such host
```
This can be resolved by setting a service alias for the Docker service:
```
plaintext
services:
- name: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/docker:18.09.7-dind
alias: docker```
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