forked from labtraining/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker_excercise2.txt
More file actions
5 lines (5 loc) · 1.02 KB
/
Copy pathdocker_excercise2.txt
File metadata and controls
5 lines (5 loc) · 1.02 KB
1
2
3
4
5
1.Using the CentOS 6 base image download, start a container based on that image. Be sure that container starts connected to the current terminal in interactive mode and runs the bash command so you are logged in to the command prompt on the container once it boots.
2.Once you are sitting at a command prompt on the running container, execute the update command (installing all updates for the container OS).
3.Now that updates are complete, install the Apache Web Server. Once installed, make sure the web server service will start and verify that the container is listening on port 80 (install other software if needed to do so).
4.Exit the container. Once the container is stopped, execute the appropriate command to list all stopped containers and locate the name and ID of the container you just exited. Make a note of the name and ID.
5. Using the name or ID of the container, commit the changes you made within it to a new base image called "newcentos:withapache" and verify that it shows when you list the images on your system.