Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dns issues #266

Open
bsamsom opened this issue Apr 7, 2022 · 2 comments
Open

dns issues #266

bsamsom opened this issue Apr 7, 2022 · 2 comments

Comments

@bsamsom
Copy link

bsamsom commented Apr 7, 2022

🗣️ Foreword

I can't for the life of me get DNS to work via the default nameserver of 127.0.0.11, overridding it with a dns setting deosnt change the value of the nameserver in /etc/resolv.conf

👻 Brief Description

I've tried overriding DNS with

platforms:
  - name: centos-7
    driver:
      image: dokken/centos-7
      pid_one_command: '/usr/sbin/init'
      dns:
        - 8.8.8.8
      volumes:
        - /sys/fs/cgroup:/sys/fs/cgroup:ro
      privileged: true

in .kitchen.yml, but /etc/resolv.conf still has 127.0.0.11 as its only nameserver. If I manually alter /etc/resolv.conf to hit 8.8.8.8 instead, name resolution works.

Version

2.17.0

Environment

docker 4.2.0 on macOS Monterey 12.3.1

Scenario

Be able to hit https://rubygems.org/ or any other site from the contianer via a dns nameserver provided in .kitchen.yml

Steps to Reproduce

---
driver:
  name: dokken
  chef_version: 14

transport:
  name: dokken

provisioner:
  name: dokken
  
platforms:
  - name: centos-7
    driver:
      image: dokken/centos-7
      pid_one_command: '/usr/sbin/init'
      dns:
        - 8.8.8.8
      volumes:
        - /sys/fs/cgroup:/sys/fs/cgroup:ro
      privileged: true

Expected Result

log into container and run cat /etc/resolv.conf and see the set nameserver(8.8.8.8 in this example) nameserver 8.8.8.8

Actual Result

only see the default nameserver in /etc/resolv.conf nameserver 127.0.0.11

➕ Additional context

This is the same as the closed issue: #247

@bsamsom
Copy link
Author

bsamsom commented Apr 25, 2022

Definitly something wierd going on with dokken/dokker dns, in order for the dokken container to reach other docker containers i needed to:

  1. run docker network inspect dokken
  2. grab the gateway address
  3. use the gateway adress and the port number of the other containter to reach it, it cant be directly reached by container name, only by 'gateway ip:port'

@hunter86bg
Copy link

Same issue is observed when using podman - /etc/resolv.conf is not updated as per kitchen.yml dns section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants