Skip to content

Latest commit

 

History

History
130 lines (88 loc) · 3.42 KB

dependency_proxy.md

File metadata and controls

130 lines (88 loc) · 3.42 KB

Dependency Proxy

This document describes how to enable the dependency proxy in your GDK environment.

License

An Ultimate license is needed to use the dependency proxy.

Configuration

Linux

With the License and Puma requirements met above, there is no additional set up required, the dependency proxy is already enabled and configured.

Test it with

sudo docker run localhost:3000/gitlab-org/dependency_proxy/containers/hello-world:latest

Docker should succeed and you should see

Hello from Docker!
This message shows that your installation appears to be working correctly.

in the output.

MacOS

Use an IP address with your GDK installation, localhost does not work

This can be accomplished by updating the GDK configuration by creating or updating the gdk.yml file in the root of your GDK directory.

The file should contain the intended host, such as 127.0.0.1 or 0.0.0.0:

host: 0.0.0.0

Run gdk reconfigure and gdk restart to invoke the changes and visit the IP (0.0.0.0:3000) to check if GitLab is accessible through the new IP.

Reconfigure the Docker daemon

Edit daemon.json using the Docker Desktop UI or by editting it directly.

Editting directly

The daemon.json file is located at:

  • MacOS: ~/.docker/daemon.json
  • Linux: /etc/docker/daemon.json
  • Windows: C:\ProgramData\docker\config\daemon.json
  1. Add these values to the file:

    {
      "experimental": true,
      "insecure-registries": ["0.0.0.0:3000", "127.0.0.1:3000"]
    }
  2. Restart Docker: this will vary depending on how you are running Docker. See the specific documentation for your platform (Rancher, Docker Desktop, etc.)

Old Docker Desktop for Mac (< 2.2.0.0)

Open Docker -> Preferences, and navigate to the tab labeled Daemon. Check the box to enable Experimental features and you can add a new Insecure registry. Click Apply & Restart.

Adding an insecure registry

Docker Desktop for Mac 2.2.0.0+ (newest versions)

Open Docker -> Right click on status bar -> Preferences -> Docker Engine, and type in:

{
  "experimental": true,
  "insecure-registries": ["0.0.0.0:3000", "127.0.0.1:3000"]
}

Adding an insecure registry on the new app

Once Docker has restarted, you can test the dependency proxy with:

sudo docker run 0.0.0.0:3000/gitlab-org/dependency_proxy/containers/hello-world:latest

Docker should succeed and you should see the following:

Hello from Docker!
This message shows that your installation appears to be working correctly.

Object storage

When using object storage, two additional steps must be taken.

  1. The object storage host must be the same as the Dependency Proxy host. If you used 0.0.0.0 as described above, you must include that as the object storage host in the gdk.yml file:

    object_store:
      enabled: true
      host: 0.0.0.0
  2. The object storage domain must be added to the insecure-registries list in the configuration section. For example:

    {
      "experimental": true,
      "insecure-registries": ["0.0.0.0:3000", "0.0.0.0:9000"]
    }