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?

  • Is it recommended to run docker swarm on single node?
  • How to send signal to program run in a docker container?
  • docker-compose: how to map few ip to few containers
  • Why is my dockerfile not copying directories
  • Docker-compose corrupted directory when shared a multiple file/directory in the same mounting point
  • Docker - copy file from container to host
  • Docker Debian install fails
  • Where exactly, are files in docker container stored on the host machine
  • How to set up connection between Docker containers using AWS Beanstalk and Spring Cloud Netflix
  • find docker containers created using a docker image
  • SkyDNS in Daemon Sets and local DNS resolution
  • Jenkins .Net and Docker?
  • 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 192.168.12.34 -j DROP
    

    or

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