Docker Compose allows defining and running multi-container Docker applications. It uses a compose file to configure applications composed of multiple services that use Docker's API to start and stop containers together. Docker Swarm extends Docker's clustering capabilities and schedules containers across multiple Docker hosts. While Docker Compose is for single host deployment, Swarm enables scheduling containers across multiple hosts for scaling and high availability. The session covered Docker Compose configuration, networking, and compared it to Docker Swarm for clustering containers across multiple hosts.
12. GUESS
● What happens if both build and image tag are present?
build: ./dir
image: webapp:tag
13. RESULT
● What happens if both build and image tag are present?
build: ./dir
image: webapp:tag
This results in an image named webapp and tagged tag, built
from ./dir.
20. BRIDGE
● Default
○ Created by default
● User defined
○ User needs to create and attach it to container
■ During container run command
■ Attach on running container
21. BRIDGE DIFF
● Default
○ Accessible through ip address
● User defined
○ Accessible through both ip address and container name
Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a Compose file to configure your application's services. Then, using a single command, you create and start all the services from your configuration.
Written in python eventhough docker is completely written in go
For MacOS / Windows: Already installed
For Linux: install manually
Load balancer
Used for autoscaling
What happens when docker file has image:redis?
If image does not exist compose attempts to pull it.
“3000” <- container port
We ignore this for now.
Myapp_default network
Docker Swarm is a clustering and scheduling tool for Docker containers.