Skip to content

dns issues #266

@bsamsom

Description

@bsamsom

🗣️ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions