How to mimic a Docker registry down situation

I’m trying to test how our app handles when the Docker registry becomes unavailable for it to pull Docker images, and want to mimic the situation.

I don’t have any control over the firewall rule of the network or DNS of the servers. The only changes I can make are on the VM I’m using, like VM configurations and Docker configurations. Wondering what I can do to make it as if Dockerhub is down?

  • /home/web/.gem/ruby/2.2.0/gems/redis-3.2.1/lib/redis/connection/ruby.rb:152:in `getaddrinfo': getaddrinfo: Name or service not known (SocketError)
  • Docker container fails to start
  • Run docker in shell using PHP
  • dockerizing wordpress with mysql installed on the host machine
  • Using /container/id/top command for docker api
  • GitLab Docker Registry Running inside Docker
  • Docker with mongo user
  • RSA server certificate apache2
  • Unable to run Openfire with supervisord in docker container
  • Publisher Public key for docker notary
  • Is it possible to let ansible print each statement?
  • Some questions about Docker Image
  • One Solution collect form web for “How to mimic a Docker registry down situation”

    You can use the iptables to filter the output on your VM and dropping packet

    For example :

    # iptables -A OUTPUT -d -j DROP


    # iptables -A OUTPUT -p tcp -d --dport 80,443 -j DROP
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.