July Release Confetti
150+ New Courses, Hands‑On Labs, And
Interactive Learning Activities
Learn More

LiNUX Lab

Share a Data Volume with a Container

We deploy the real environment, you take the scenario-based labs on us. Hands-on, from anywhere, at any time.

Time required: 2 Hours

Objectives

Using many of the Docker commands we have learned.  We will share data from the host to a container.

Overview

In this lab, we will put into practice some of the Docker commands that we have learned. Using what we know, we will instantiate a Docker container running apache and use a mounted host directory as the html folder.

We will use a typical client to connect and verify functionality.  Then make a change to the contents of the data folder.  Changes should be reflected on the instance.  Then end the lab by stopping and deleting the container instance.

 

 

Scenarios

1. Install Docker and configure the service so that it is running.
2. Pull the Apache Docker container from Docker Hub.
3. Create a host data folder for an index.html file.
4. Create index.html file in the local data folder.
5. Instantiate the Apache instance and mount a data volume to the container.
6. Install a webclient on the host and test the apache instance.
7. Change the data on the data volume and ensure the changes are reflected on the apache instance.
8. Check the container logs.
9. Stop the container instance and verify it has stopped.
10. Delete the datavolume.
11. Delete the Apache container completely from the host system.
12. List all stopped containers to verify it has been removed.

Share our Labs
Start Your Free Trial

We have the longest and most in depth courses about cloud and engineering topics on the web. All of our training content is included with every membership.