Skip to content

Caddy 2 is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go. docker-caddy-azuredns adds Azure DNS LetsEncrypt support to the base image.

Notifications You must be signed in to change notification settings

best-family/docker-caddy-azuredns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-caddy-azuredns

Latest Release Docker Build

A Caddy Server Docker container with the Azure DNS Provider.

Based heavily on the code at https://github.com/SlothCroissant/caddy-cloudflaredns

Builds are available at the following Docker repositories:

A few things to note:

  1. Ensure you're signed into the GitHub container registery.

    docker login ghcr.io -u <YOUR GITHUB USERNAME>

Refer to the GitHub documentation if required.

  1. You should add Azure client related values as environment variables to your docker run command. Example:

    docker run -it --name caddy \
        -p 80:80 \
        -p 443:443 \
        -v caddy_data:/data \
        -v caddy_config:/config \
        -v $PWD/Caddyfile:/etc/caddy/Caddyfile \
        -e AZURE_TENANT_ID=00000000-0000-0000-0000-000000000000 \
        -e AZURE_CLIENT_ID=00000000-0000-0000-0000-000000000000 \
        -e AZURE_CLIENT_SECRET= \
        -e AZURE_SUBSCRIPTION_ID=00000000-0000-0000-0000-000000000000 \
        -e AZURE_RESOURCE_GROUP_NAME= \
        -e ACME_AGREE=true \
        best-family/docker-caddy-azuredns:latest
  2. You should add the following to your Caddyfile as the tls directive.

     tls {
       dns azure {
         tenant_id {$AZURE_TENANT_ID}
         client_id {$AZURE_CLIENT_ID}
         client_secret {$AZURE_CLIENT_SECRET}
         subscription_id {$AZURE_SUBSCRIPTION_ID}
         resource_group_name {$AZURE_RESOURCE_GROUP_NAME}
       }
     }
    

docker compose

See the docker-compose.yaml in the examples. Be sure you also set up your .env file for use. See dot env below.

dot env

You can use a dot env file to set your environment variables.

About

Caddy 2 is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go. docker-caddy-azuredns adds Azure DNS LetsEncrypt support to the base image.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published