Docker
Container Native (CN) - Docker
Last updated
Container Native (CN) - Docker
Last updated
RELATED: SETUP > Dev Environment > Container - Docker | EXAMPLES > Cloud Solutions#Docker |
# start container
$ docker run [image_name][:image_version]
$ docker stop <container_name>
# restart container
$ docker start <container_name>
node-red
elasticSearch - see Github: https://github.com/gabepublic/docker-compose-elasticsearch#test-application-by-starting-using-docker-compose
Docker Networking types:
bridge - the default network driver; used by in standalone container applications to communicate
host - used in docker swarm only; standalone container connects to the host network directly
overlay - used in docker swarm to connect multiple docker daemon
macvlan - used with legacy application, where a MAC address can be assigned to a container to have it appear as if it were a physical device on the network
none - completely disables network that is useful if a custom network driver is used
Docker container network topology is typically: 172.17.0.0/16
. The docker bridge (docker0
) connects to the docker network (172.17.0.1
), the virtual Ethernet interfaces (i.e., veth0, veth1, etc.), as well as to the physical network (e.g., 192.168.1.10). All the containers (i.e., 172.17.0.2
, 172.17.0.3
, etc.) are connected to the docker network, and the virtual Ethernet interfaces (i.e., veth0, veth1, etc.) as well so that they can plug into the network switch. The docker bridge uses NAT to route the containers' traffic into the physical network.
Use nmap
to inspect the network (docker run nmap
)
Use ifconfig
to show docker0
, vethxxx