Open
Description
Hi, unfortunately I don't have the time to create a PR but in case anyone wants to get this running on Fedora, here's a how to guide.
- The installer doesn't work since it expects apt to exist so we have to install manually.
- Run
GATEWAY=$(ip -4 addr show docker0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
- Run
echo ${GATEWAY}
to make sure the gateway address is found. - Run the container:
docker run -d --name dns-gen \
--restart always \
--net host \
-e GATEWAY=$GATEWAY \
--log-opt "max-size=10m" \
--volume /:/host \
--volume /var/run/docker.sock:/var/run/docker.sock \
jderusse/dns-gen:2
- Run
sudo mkdir /etc/systemd/resolved.conf.d
since in my installation the folder did not exist. - Run
sudo vi /etc/systemd/resolved.conf.d/docker-dns.conf
- Within vim add the Gateway address (obviously the 3 dots should be replaced with the IP address):
[Resolve]
DNS=...
- Restart resolv:
sudo systemctl restart systemd-resolved.service
- Verify the config is found:
systemd-analyze cat-config systemd/resolved.conf
It should now work, you can start a nginx container:
docker run -d --rm --name test nginx:alpine
dig test.docker @${GATEWAY}
dig test.docker
Everything should work now.
Metadata
Assignees
Labels
No labels