Skip to content

Getting it running on Fedora 34 #27

Open
@waltertamboer

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.

  1. The installer doesn't work since it expects apt to exist so we have to install manually.
  2. Run GATEWAY=$(ip -4 addr show docker0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
  3. Run echo ${GATEWAY} to make sure the gateway address is found.
  4. 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
  1. Run sudo mkdir /etc/systemd/resolved.conf.d since in my installation the folder did not exist.
  2. Run sudo vi /etc/systemd/resolved.conf.d/docker-dns.conf
  3. Within vim add the Gateway address (obviously the 3 dots should be replaced with the IP address):
[Resolve]
DNS=...
  1. Restart resolv: sudo systemctl restart systemd-resolved.service
  2. Verify the config is found: systemd-analyze cat-config systemd/resolved.conf

It should now work, you can start a nginx container:

  1. docker run -d --rm --name test nginx:alpine
  2. dig test.docker @${GATEWAY}
  3. dig test.docker

Everything should work now.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions