Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oliversalzburg/docker-cloudflare-dns
Updates CloudFlare DNS with IP addresses of running Docker containers.
https://github.com/oliversalzburg/docker-cloudflare-dns
cloudflare cloudflare-dns dns docker docker-labels
Last synced: 4 months ago
JSON representation
Updates CloudFlare DNS with IP addresses of running Docker containers.
- Host: GitHub
- URL: https://github.com/oliversalzburg/docker-cloudflare-dns
- Owner: oliversalzburg
- License: mit
- Created: 2023-03-05T10:56:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-04T22:03:57.000Z (4 months ago)
- Last Synced: 2024-10-04T23:03:38.578Z (4 months ago)
- Topics: cloudflare, cloudflare-dns, dns, docker, docker-labels
- Language: TypeScript
- Homepage:
- Size: 5.57 MB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-cloudflare-dns
Updates CloudFlare DNS with IP addresses of running Docker containers.
## Usage
`CLOUDFLARE_API_KEY` needs to have `Edit` permissions for all zones that you want to maintain.
```shell
docker run --rm --name cloudflare-dns \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
--env "CLOUDFLARE_API_KEY=" \
ghcr.io/oliversalzburg/docker-cloudflare-dns:v0.0.6
```Output will guide you from there, if anything is wrong.
### Labels
Behavior is controlled through container labels:
| Label | Required | Description |
| ---------------------- | -------- | --------------------------------------------------------------- |
| `'cloudflare.enabled'` | yes | Set to `'true'` to include this container in DNS updates. |
| `'cloudflare.zone'` | yes | Specifies the zone in your CloudFlare account to update. |
| `'cloudflare.name'` | no | Override the record name. Default is the name of the container. |## Example
```shell
docker run --rm --name traefik \
--publish "8080:8080" \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
--label "cloudflare.enabled=true" \
--label "cloudflare.name=ingress" \
--label "cloudflare.zone=example.com" \
traefik:latest \
--api.insecure=true \
--providers.docker=true \
--providers.docker.exposedByDefault=false
```## Release Process
```
npm version patch --message "chore: Version bump %s"
```