You've pulled an image named 'my-app-image'. How would you start a container from this image and give it the name 'my-app-container'?
docker run --name my-app-container my-app-image
docker run -d my-app-container my-app-image
docker run my-app-image my-app-container
docker run -it my-app-image -n my-app-container
How do you specify the Docker image to be used for a service in 'docker-compose.yml'?
build:
container:
from:
image:
How do you list all running Docker containers?
docker run -it
docker images
docker ps -a
docker ps
Which component of the Docker architecture is responsible for building and running Docker containers?
Docker Client
Docker Server
Docker Daemon
Docker Hub
What is the default network type used by Docker when creating a new container?
None
Host
Bridge
Overlay
Which component of Docker's architecture is responsible for building and storing Docker images?
Docker Container
Docker Host
Docker Registry
What's the purpose of the -d flag when running a Docker container?
-d
Run the container in detached mode (background).
Delete the container automatically after it exits.
Disable networking for the container.
Display detailed logs from the container.
How do Docker containers differ from virtual machines?
Containers require more resources than VMs.
Containers are used only for development, while VMs are for production.
Containers share the host kernel, while VMs have their own.
Containers cannot run on the cloud.
Which command is used to create and start a Docker container?
docker run
docker build
docker start
docker create
What is the primary purpose of Docker Compose?
Building individual Docker images
Defining and managing multi-container Docker applications
Deploying Docker containers to production servers
Storing Docker images in a central repository