Docker volumes backup and restore & Docker networks

 Backup and restore docker volumes

Official link

Youtube

Best aricle for volumes backup and restoration


Docker neworks:

Network drivers:

Network driver summary:

Bridge network

Official link:

  • The default network used by docker if we do not specify any option is bridge network
  • We can create our own bridge network, Containers on the default bridge network can only access each other by IP addresses, unless you use the --link option, which is considered legacy. On a user-defined bridge network, containers can resolve each other by name or alias.
  • We can create bridge network as shown below
     $docker network create <network name>

 If we don't specify any network driver then by default it is bridge and we can define subnet and default gateways by using different flagsf

  • we can add container to user defined network 2 ways
  1. While creating docker container from image using --network or --net flag
       $docker run --it --net=<network name> centos

     2. If a container is already running in default bridge network or any other network,we can add that             container to our own network in fly with out stopping container using connect

      $docker network connect <container name> <network name>






Comments

Popular posts from this blog

Docker Imp points