Skip to content
ConfigurationRegistriesDocker Hub

HUB (Docker Hub incl private repositories)

The hub registry lets you configure Docker Hub integration.

logo

The hub registry lets you configure Docker Hub integration.

Supported credential shapes are:

  • Docker Hub login + access token (LOGIN + TOKEN)
  • Docker Base64 credentials (like in .docker/config.json)
  • Docker Hub login + password or access token through PASSWORD
By default, if you don't configure any registries, drydock will configure a default one with anonymous access. Don't forget to configure authentication if you're using Docker Hub Private Repositories.

Variables

Env varRequiredDescriptionSupported valuesDefault value when missing
DD_REGISTRY_HUB_{REGISTRY_NAME}_LOGINA valid Docker Hub login (required with PASSWORD or TOKEN)Docker Hub username
DD_REGISTRY_HUB_{REGISTRY_NAME}_PASSWORDA valid Docker Hub password or access token (LOGIN must be defined)Docker Hub password or access token
DD_REGISTRY_HUB_{REGISTRY_NAME}_TOKENA Docker Hub access token (LOGIN must be defined; cannot be combined with PASSWORD)Docker Hub access token
DD_REGISTRY_HUB_{REGISTRY_NAME}_AUTHA valid Docker Hub Base64 Auth String (cannot be combined with LOGIN/PASSWORD/TOKEN)Base64 encoded username:password string
Registry auth fails closed for invalid combinations. Use exactly one complete shape: LOGIN+PASSWORD, LOGIN+TOKEN, AUTH, or no credentials. In particular, the former token-only DD_REGISTRY_HUB_PUBLIC_TOKEN compatibility configuration is rejected in v1.6 instead of silently falling back to anonymous access; pair it with DD_REGISTRY_HUB_PUBLIC_LOGIN or remove it for intentional anonymous pulls.

Examples

Configure Authentication using Login/Token

1. Login to your Docker Hub Account

image

2. Go to your Security Settings

  • Create a new Access Token
  • Copy it and use it as the DD_REGISTRY_HUB_PUBLIC_TOKEN value alongside your login

image

services:
  drydock:
    image: codeswhat/drydock
    ...
    environment:
      - DD_REGISTRY_HUB_PUBLIC_LOGIN=johndoe
      - DD_REGISTRY_HUB_PUBLIC_TOKEN=example-token
docker run \
  -e DD_REGISTRY_HUB_PUBLIC_LOGIN="johndoe" \
  -e DD_REGISTRY_HUB_PUBLIC_TOKEN="example-token" \
  ...
  codeswhat/drydock

Configure Authentication using Base64 encoded credentials

1. Create an Access Token

See above

2. Encode with Base64

Concatenate login:password and encode it locally. Base64 is encoding, not encryption; never send registry credentials to an online encoder.

printf '%s' 'johndoe:example-token' | base64

For example,

  • if your login is johndoe
  • and your password is example-token
  • the resulting encoded string would be am9obmRvZTpleGFtcGxlLXRva2Vu
services:
  drydock:
    image: codeswhat/drydock
    ...
    environment:
      - DD_REGISTRY_HUB_PUBLIC_AUTH=am9obmRvZTpleGFtcGxlLXRva2Vu
docker run \
  -e DD_REGISTRY_HUB_PUBLIC_AUTH="am9obmRvZTpleGFtcGxlLXRva2Vu" \
  ...
  codeswhat/drydock