Question - How do you create a Docker container?
Answer -
Task: Create a MySQL Docker container
A user can either build a Docker image or pull an existing Docker image (like MySQL) from Docker Hub.
Now, Docker creates a new container MySQL from the existing Docker image. Simultaneously, the container layer of the read-write filesystem is also created on top of the image layer.
- Command to create a Docker container: Docker run -t –i MySQL
- Command to list down the running containers: Docker ps