1.
Docker¶
https://docs.docker.com/get-started/08_using_compose/
docker-compose.yml
Starting the container
To start the container, run:
up
brings up the container-d
runs in detached mode
Deleting and stopping containers
To delete container:
To stop it:1.1.
Other Docker Compose params¶
restart: always
restarts after reboot
1.2.
Networks¶
Network configuration example
version: "3.9"
services:
website: # Becomes a network alias name
image: nginx
ports:
- 8081:80
website2: # Becomes a network alias name
image: nginx
ports:
- 8082:80
network:
website_net:
ipv4_address: 192.168.92.21
networks:
website_net:
ipam: #ip address management
driver: default # bridge is default
config:
- subnet: 192.168.92.0/24