Docker - Sample Interview Question (Junior Level)

After running the following command

docker run -it --rm -p 8888:8080 tomcat:8.0

You pressed on Ctrl+C, what will happen to the container and the image?
  1. The container will be running since it was detached, and so does the image
  2. The container and the image will be removed
  3. The image will be removed and the container will still be running
  4. The container will be removed and the image will persist
Tests in Docker for Juniors

Test Name Difficulty Time (minutes) No. of Questions
Docker Online Test for Juniors Docker Junior 20 10