Skip to content

Default Docker registry and credentials#3747

Merged
jvstme merged 2 commits intomasterfrom
issue_3727_default_docker_registry
Apr 7, 2026
Merged

Default Docker registry and credentials#3747
jvstme merged 2 commits intomasterfrom
issue_3727_default_docker_registry

Conversation

@jvstme
Copy link
Copy Markdown
Collaborator

@jvstme jvstme commented Apr 6, 2026

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
    – 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: The
    value may be visible to anyone who can SSH into
    instances managed by dstack, which usually
    includes all users of that dstack server.

Closes #3727

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.
@jvstme jvstme requested a review from un-def April 6, 2026 22:37
@jvstme jvstme merged commit 09d4983 into master Apr 7, 2026
28 checks passed
@jvstme jvstme deleted the issue_3727_default_docker_registry branch April 7, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Server-level default Docker registry and credentials

2 participants