Pop quiz You are creating a new container with this command docker run d name

Pop quiz you are creating a new container with this

This preview shows page 116 - 125 out of 160 pages.

Pop quiz You are creating a new container with this command: docker run -d --name myubuntu ubuntu /bin/sh -c "while true; do echo current date and time is: $(date); sleep 10; done” Which network is the “myubuntu” container attached to? A. Bridge B. Overlay C. Custom D. None
Image of page 116
Pop quiz: answer Bridge network. By default, a newly created container is attached to the bridge network (unless a different network is specified, for example, using the “—network” option with the docker run command). $ docker network inspect bridge [ { "Name": “bridge", // ... "Containers": { "04579b88a74c981ae854261dffc7ab17328c28bb6fafec0f9c1e9431e77b3b27": { "Name": "myubuntu", "EndpointID": "8a0e7a2559eac35eb60a90e85554679de276bd1ba39ff3a4083301d08e9ee384", "MacAddress": "02:42:ac:11:00:03", "IPv4Address": "172.17.0.3/16", "IPv6Address": "" }, // ... }, // ... } ]
Image of page 117
Orchestration Docker swarm provides “clustering capabilities”, i.e., be able to treat group of Docker engines into a single virtual Docker engine
Image of page 118
Docker Swarm “swap, plug, and play”
Image of page 119
Docker Swarm $ docker swarm init Swarm initialized: current node (81snul7czu9pg42h3qnm2v5hr) is now a manager. To add a worker to this swarm, run the following command: docker swarm join --token SWMTKN-1-2tn8fic07uivk29ith095me3r6cro7bkrfnbtv6va3qvf6urew-6olc37m9ljymly3fcb6rig2nu 192.168.65.2:2377 To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
Image of page 120
Clustering for Docker “batteries included but swappable”
Image of page 121
Docker Security
Image of page 122