Which command lists running containers?
Answer & explanation
Answer: docker ps
`docker ps` lists running containers. Add `-a` to include stopped containers.
Practice container lifecycle, Dockerfiles, port publishing, storage, and resource configuration.
A random set of up to 10 questions from Docker. Your answers stay on this page.
Open a topic above to explore the complete question bank.
Answer: docker ps
`docker ps` lists running containers. Add `-a` to include stopped containers.
Answer: Starts a container in the background
`-d` runs the new container detached from the terminal.
Answer: Volume
A volume has a lifecycle independent of an individual container and is commonly used for persistent data.
Answer: 8080
Port publishing uses `HOST_PORT:CONTAINER_PORT`, so host port 8080 forwards to container port 80.
Answer: FROM
`FROM` begins a build stage and names its base image.
docker ___Answer: images
`docker images` lists images stored locally.