How it works...

Verify whether the Docker container has been created and is running successfully by executing the following command:

$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f2ec80f82056 mysql:latest "docker-entrypoint.sh" 8 seconds ago Up 6 seconds 0.0.0.0:3306->3306/tcp mysql-container

Inspecting the my-bridge-network again will show us the mysql-container details in the Containers section, as follows:

$ docker network inspect my-bridge-network[  {    "Name": "my-bridge-network",    "Id": "325bca66cc2ccb98fb6044b1da90ed    4b6b0f29b54c4588840e259fb7b6505331",    "Scope": "local",    "Driver": "bridge",    "EnableIPv6": false,    "IPAM":     {      "Driver": "default",      "Options": {},      "Config":       [        {          "Subnet": "172.18.0.0/16", "Gateway": "172.18.0.1" ...

Get Go Web Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.