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?

  • HAProxy over SSL with RabbitMQ SSL authentication + Kombu client - IOError('Socket Closed')
  • Docker Compose with one Terminating Container
  • What solutions exist for lightweight version control of an entire system image?
  • Docker continuum/miniconda3 container not showing “conda”
  • Error when doing a docker ps
  • How to build my docker (nodejs) container in travis and run in production
  • Why docker build is so slow
  • Running Wildfly Swarm with KeyCloak on docker image
  • How can I set up a Docker network with restricted communication?
  • Can I use docker for installing ubuntu on a Mac?
  • Postgres to Ubuntu Docker container linking not working
  • How to create concourse loop for repetitive resources and jobs?
  • 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.