Difficulty: beginner
Estimated Time: 10 minutes

In this scenario, we'll explore how to create docker images interactively using commands like docker commit, docker diff etc.

In this scenario we learned to inspect changes and create an image from changes interactively using docker commit. We also learned how to tag them.

Building Images Interactively

Step 1 of 4

Step 1

Step 1 - Install Apache into running container

docker commit command creates an image from container's changes.

Start an Debian container:

docker run -it debian. It will pull debian image to your local system if it does not exist already.

After pulling image, it will start container and open a shell into running container.

We'll install Apache into running container. apt-get update && apt-get install apache2 -y

exit