Default Docker registry and credentials#3747
Merged
Conversation
Add the following server environment variables for
configuring the default Docker registry and the
default Docker registry credentials on the
`dstack` server level:
- `DSTACK_SERVER_DEFAULT_DOCKER_REGISTRY` – A
default Docker registry to use for job images
that do not specify an explicit registry. E.g.,
if set to `registry.example`, then
`image: ubuntu` becomes equivalent to
`image: registry.example/ubuntu`. **Note**: This
setting should only be used for configuring
registries that act as a pull-through cache for
Docker Hub. The default `dstack` images are also
pulled from the configured registry.
- `DSTACK_SERVER_DEFAULT_DOCKER_REGISTRY_USERNAME`{
#DSTACK_SERVER_DEFAULT_DOCKER_REGISTRY_USERNAME
} – Username for authenticating with the default
Docker registry. See
`DSTACK_SERVER_DEFAULT_DOCKER_REGISTRY_PASSWORD`.
- `DSTACK_SERVER_DEFAULT_DOCKER_REGISTRY_PASSWORD`{
#DSTACK_SERVER_DEFAULT_DOCKER_REGISTRY_PASSWORD
} – Password for authenticating with the default
Docker registry. Applied only when the image has
no explicit registry and the run configuration
does not specify `registry_auth`. **Note**: The
value may be visible to anyone who can SSH into
instances managed by `dstack`, which usually
includes all users of that `dstack` server.
un-def
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the following server environment variables for
configuring the default Docker registry and the
default Docker registry credentials on the
dstackserver level:DSTACK_SERVER_DEFAULT_DOCKER_REGISTRY– Adefault Docker registry to use for job images
that do not specify an explicit registry. E.g.,
if set to
registry.example, thenimage: ubuntubecomes equivalent toimage: registry.example/ubuntu. Note: Thissetting should only be used for configuring
registries that act as a pull-through cache for
Docker Hub. The default
dstackimages are alsopulled from the configured registry.
DSTACK_SERVER_DEFAULT_DOCKER_REGISTRY_USERNAME– Username for authenticating with the default
Docker registry. See
DSTACK_SERVER_DEFAULT_DOCKER_REGISTRY_PASSWORD.DSTACK_SERVER_DEFAULT_DOCKER_REGISTRY_PASSWORD– Password for authenticating with the default
Docker registry. Applied only when the image has
no explicit registry and the run configuration
does not specify
registry_auth. Note: Thevalue may be visible to anyone who can SSH into
instances managed by
dstack, which usuallyincludes all users of that
dstackserver.Closes #3727