Issues with docker build command and github

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

I created the following docker file

  • ingensi/play-framework image repetitive downloads
  • Docker + SSL + apache2 + x509
  • Error: Postgres database import in docker container
  • How to mount a directory in docker container to host
  • Docker-compose setup mongodb with data and a nodejs server
  • docker images hierarchy managment
  • FROM rails:4.2
    MAINTAINER Chen Kinnrot <kinnrot@gmail.com>
    RUN mkdir -p /var/app
    COPY Gemfile /var/app/Gemfile
    WORKDIR /var/app
    RUN bundle install
    CMD rails s -b 0.0.0.0
    

    When Running docker build -t dev .

    I get the follwing message

    fatal: unable to connect to github.com:
    github.com: Name or service not known

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

  • Getting “Invalid address” error on gunicorn bind with my server ip . i am trying this within the docker
  • Tomcat freezes in Docker container when starting
  • How to change proxy information for New Docker for Mac?
  • Unable to find image '7111.mithun:latest' locally Error response from daemon: repository 7111.mithun not found: does not exist or no pull access
  • Kubernetes run on AWS
  • Labelling images in docker
  • 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; https://github.com/boot2docker/boot2docker/issues/776, https://github.com/docker/machine/issues/1857

    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 8.8.8.8" > /etc/resolv.conf
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.