NEW
Font size
WorksheetsDocker fundamentals
Total questions: 12
Worksheet time: 6mins
Docker command to list all the images
docker load -i drupal.tar
docker ps
docker images
docker ps -a
Docker command to see all the containers
docker images
docker version
docker ps
docker ps -a
Docker command to see only running containers
docker ps -a
docker images
docker ps
docker version
Docker command to check the IP address of container
docker ps -a
docker logs websrv
docker images
docker inspect websrv
Docker command to find out the cause of container exit with error.
docker logs websrv
docker inspect websrv
docker ps -a
docker ps
Docker command to enter into a container
docker inspect dbsrv
docker logs dbsrv
docker exec -it dbsrv bash
docker ps -a
How do containers differ from virtual machines?
Containers include a full operating system
Containers use more memory
Containers share the host OS kernel
Containers cannot be networked
In Docker, volumes are used to:
Run containers in parallel
Encrypt container data
Persist data outside containers
By default, when a container is removed, changes made to the container is kept safe.
true
false
What is the purpose of docker-compose?
To monitor Docker containers
To define and run multi-container Docker applications
To upload images to Docker Hub
What is the main benefit of using containers in software development?
They eliminate the need for source code
They require no configuration
They provide consistency across different environments
They are free to use.
Which of the following best explains “port mapping” in Docker?
It opens a firewall port
It assigns new IP addresses
It connects the container’s internal port to a port on the host
