Docker Essentials & Image Management

    Question 1DOCKER- Purpose of Docker

    What is the primary purpose of Docker in modern development?

    Question 2DOCKER- Difference Between Image and Container

    Which statement correctly distinguishes Docker images from containers?

    Question 3DOCKER- Code Snippet (Dockerfile Basics)

    What is the purpose of this Dockerfile snippet?

    FROM openjdk:17 COPY target/app.jar app.jar ENTRYPOINT ["java", "-jar", "app.jar"]

    Question 4DOCKER- Build and Run Commands

    What is the correct sequence to build and run a Docker image named `myapp`?

    Question 5DOCKER- Inspecting Images

    Which command lists all Docker images on the local system?

    Question 6DOCKER- Code Snippet (Run Container With Port Mapping)

    What does this command do?

    docker run -d -p 8080:8080 myapp

    Question 7DOCKER- Volumes Purpose

    Why are Docker volumes used?

    Question 8DOCKER- Code Snippet (Attach Volume)

    What does this command achieve?

    docker run -d -v /host/data:/app/data myapp

    Question 9DOCKER- Removing Containers and Images

    Which commands remove a container and an image respectively?

    Question 10DOCKER- Networking Basics

    What is the default network mode when a container is started?