DrydockDrydock
Configuration

DNS

Configure DNS resolution behavior for registry checks, trigger webhooks, and agent communication.

DNS Result Ordering

Drydock runs on Alpine Linux, which uses musl libc. Musl's DNS resolver can return getaddrinfo EAI_AGAIN errors on dual-stack (IPv4/IPv6) networks when IPv6 records are returned first but IPv6 connectivity is unavailable.

To prevent this, drydock defaults to IPv4-first DNS ordering at startup. This matches the behavior of Node.js versions prior to v17 and works correctly on the vast majority of networks.

Variables

Env varRequiredDescriptionSupported valuesDefault
DD_DNS_MODE-DNS result ordering modeipv4first, ipv6first, verbatimipv4first

Values

ValueBehavior
ipv4firstIPv4 addresses are resolved before IPv6 (default). Prevents EAI_AGAIN errors on most networks.
ipv6firstIPv6 addresses are resolved before IPv4. Use only in IPv6-preferred environments.
verbatimAddresses are returned in the order the OS DNS resolver provides them. This is the Node.js default but can trigger musl DNS issues on Alpine.
This setting calls dns.setDefaultResultOrder() at process startup and affects all outbound connections: registry checks, trigger webhooks, agent communication, and OIDC token exchange.

Examples

Most users do not need to set this variable. The default ipv4first works on all IPv4 and dual-stack networks.

IPv6-only network

If drydock runs in a pure IPv6 environment with no IPv4 connectivity:

services:
  drydock:
    image: codeswhat/drydock
    environment:
      - DD_DNS_MODE=ipv6first

Restore Node.js default behavior

To use the OS resolver's native ordering (not recommended on Alpine):

services:
  drydock:
    image: codeswhat/drydock
    environment:
      - DD_DNS_MODE=verbatim
Setting DD_DNS_MODE=verbatim on Alpine may cause intermittent getaddrinfo EAI_AGAIN errors on dual-stack networks. Only use this if you have a specific reason to preserve OS-native DNS ordering.

On this page