Вы находитесь на странице: 1из 3

DevOps www.edureka.

co/devops

Module 4: Containerization Using Docker


Assignment

© Brain4ce Education Solutions Pvt. Ltd.


Module 4: Containerization Using Docker www.edureka.co/devops

Module 4: Assignment

1. Use the appropriate 'docker' commands and options to download the latest available image
in the public repository for Ubuntu. Once downloaded and installed, verify the image appears
in the local base image list.
You must use the Docker repository as defined on docs.docker.com for your chosen
distribution and version and you MUST install version 1.10+ for all exercises to complete as
indicated.
Take a screenshot of the terminal showing the successful download of the latest available
image in the public repository for Ubuntu

2. Start a container based upon the Ubuntu base image downloaded in Question 1. When you
start the container, start it connected to the current terminal, in interactive mode, starting
the bash shell for you to connect to. You may exit the container at that time.

Take a screenshot of the terminal showing the successful execution of the Docker commands

3. Create images from the containers

 Using the CentOS 7 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.
 Once you are sitting at a command prompt on the running container, execute the update
command (installing all updates for the container OS).
 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).
 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.
 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.

Take a screenshot of the terminal showing the successful execution of the above steps.

4. Expose Container Ports to Host

 Create a container from the 'centos:6' base image on your system. This container does not
need to be name but should be run in daemon mode, interactive and connected to the
current terminal. Finally, it should start the bash shell on start up
Take a screenshot of the terminal showing successful container creation.

©Brain4ce Education Solutions Pvt. Ltd Page 1


Module 4: Containerization Using Docker www.edureka.co/devops

 Using Docker inspection command, find the IP address and name for the running container.
Once you have the IP, ping the IP to be sure it is running. Finally, attach to the running
container so you are logged into the shell.
Take a screenshot of the terminal showing ping report and container attachment.
 From within the container, install the Open-SSH server and make sure the service is running.
From another terminal, try to log into the container over SSH by IP and note the result.
Take a screenshot of the terminal showing successful ssh installation and ssh run.
 Exit and stop the container. Remove the container from the list of previously run containers
once you obtain the name from the appropriate Docker command.
Take a screenshot of the terminal showing successful execution of the mentioned task.

©Brain4ce Education Solutions Pvt. Ltd Page 2

Вам также может понравиться