Registries
Work-in-Progress Documentation
The content on this page is not yet fully finished.
Tracking issue: https://github.com/dlang/dub-docs/issues/69
Configuring mirrors
As a user you might be interested in configuring DUB registry mirrors for a number of reasons:
- you want to pick mirrors geographically closer to you for better response time and possibly bandwidth
- you are running package mirrors publicly in your region or just for your infrastructure
- you are hosting a private registry
Mirrors are collected from multiple sources:
Built-in mirrors
Persistent dub.settings.json
You can configure registry mirrors on a per-package or system-wide setting.
See the registryUrls setting for more info.
DUB_REGISTRY
environment variable
You can set additional registries that are picked up for use from the DUB_REGISTRY environment variable, separated by semicolons.
Example:
# note: you don't have to include the default registries like these, only include your own registries.
env DUB_REGISTRY='https://code.dlang.org/;https://codemirror.dlang.org/' dub build
--registry=VALUE
CLI argument
Registry priority
Hosting Registries
Requirements
Building
To build the dub-registry project, then clone it and then run dub build
Running as standalone registry
Running in mirror mode
Last update:
September 16, 2023
Created: September 1, 2023
Created: September 1, 2023