Issues with docker build command and github

I’m trying to run a dev env as docker machine,

I created the following docker file

  • How to execute the Entrypoint of a Docker images at each “exec” command?
  • Docker-compose: Encountered errors while bringing up the project
  • Running docker container : iptables: No chain/target/match by that name
  • How to perform zookeeper health checks in docker swarm mode?
  • Gitlab CI: Persist MySQL data between stages
  • Error while running the ASP.NET Core WebApp on Docker in Windows 7 (Debugging)
  • FROM rails:4.2
    MAINTAINER Chen Kinnrot <>
    RUN mkdir -p /var/app
    COPY Gemfile /var/app/Gemfile
    WORKDIR /var/app
    RUN bundle install
    CMD rails s -b

    When Running docker build -t dev .

    I get the follwing message

    fatal: unable to connect to Name or service not known

    Why is that, and how can I solve this annoying issue?

  • Need to know how to use Groovy to automate a Docker build & runtime
  • How to install docker on CentOS 7?
  • Unable to install Npsql via nuget
  • How to reach the service running in docker container(overlay) externally from different hosts
  • Docker volumes MariaDB Windows
  • Rails & docker - can't install json gem
  • One Solution collect form web for “Issues with docker build command and github”

    This is a known issue with VirtualBox / boot2docker; when switching networks, boot2docker sometimes looses its DNS information. See these issues;,

    You can either try to restart the machine;

    docker-machine stop default
    docker-machine start default

    Or set the right name server to the virtual machine;

    docker-machine ssh default
    echo "nameserver" > /etc/resolv.conf
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.