# CoreDNS MySQL A CoreDNS container with the [Cloud 66 MySQL plugin](https://github.com/cloud66-oss/coredns_mysql), built from pinned upstream revisions. The image contains the standard CoreDNS plugins as well as `mysql`. ## Image The Gitea Actions workflow builds and tests the image before publishing `git.bjphoster.com/docker/coredns-mysql` with `latest` and the CoreDNS version as tags. Run with a Corefile mounted read-only: ```sh docker run --rm -p 53:53/udp -p 53:53/tcp \ -v "$PWD/Corefile:/Corefile:ro" \ git.bjphoster.com/docker/coredns-mysql:latest -conf /Corefile ``` Configure the plugin and its database according to the [plugin documentation](https://github.com/cloud66-oss/coredns_mysql). Do not store database credentials in the Corefile or repository. The plugin supports DSN environment variables. This image does not initialize a database or change DNS delegation. ## Updates and CI `.gitea/workflows/image.yaml` runs on pushes to `main`, manually, and daily. The scheduled and manual runs check the latest stable CoreDNS release and the plugin's default-branch commit. Changed revisions are built and tested before an update commit is pushed to Gitea and the image is published. The registry tags change only after a successful build and test. A failed build leaves the repository and published images unchanged. The runner needs Docker access and network access to GitHub and Gitea. Configure Gitea Actions variables `GIT_HOST`, `GIT_NAME`, `GIT_EMAIL` and `REGISTRY_USER`, and secret `GIT_TOKEN`, with permission to push to this repository and its container registry. The `GIT_TOKEN` is also used for the updater's Git push. Scheduled changes may be reviewed in Git history. Workflow execution and publication begin only after the repository and workflow are pushed and Actions is enabled. ## License MIT. See [LICENSE](LICENSE). CoreDNS and the MySQL plugin retain their own upstream licenses.