SearchโŒ˜ K
AI Features

Docker Commands

Explore essential Docker commands to manage MySQL containers including viewing, stopping, restarting, and removing containers. Understand how to create custom Docker networks for reliable container communication. Learn to perform database backups with docker exec, gaining practical skills to efficiently handle MySQL in Docker environments.

View, stop, and restart containers

Containers running in interactive mode (started with the -it switch) can normally be stopped by pressing Ctrl|Cmd + C.

๐Ÿ“Œ However, applications will not always shut down gracefully or signal they have terminated. If an interactive container fails to stop, youโ€™ll need to execute the stop command described below.

A list of running containers can be viewed by entering:

docker container ls

or the shorter:

docker ps

Practice

Letโ€™s try running the commands:

  1. Click to connect to the terminal and then open another terminal, too.

  2. List the running containers.

๐Ÿ“Œ Keep the tab open. We will be running more commands in it.

Terminal 1
Terminal
Loading...

A list of active containers is ...