Persistent Data Volumes

1 hour
  • 3 Learning Objectives

About this Hands-on Lab

#### Persistent Data Volumes

### Mission Accomplished!

Thanks to Droolidian graciousness & generosity, treats for the hungry SpaceBonians have been obtained – there’s almost too much to handle! Greatful (& full, in general) SpaceBonians have once again raised their voices that President Squawk deliver a very special message to the wonderful person who lent a helping hand to reward deserving Good Boys & Girls. As a result, we have one more request of you, our star Docker expert.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create Docker Volume

Create a new Docker volume named missionstatus

Copy Contents to Volume

Copy the contents of content-dockerquest-spacebones/volumes/ to local vol directory

cp -r /home/cloud_user/content-dockerquest-spacebones/volumes/* /var/lib/docker/volumes/missionstatus/_data/
Start an Apache2 Container

Start a new container named fishin-mission running the base httpd image available on DockerHub, with the missionstatus volume mounted.

Additional Resources

For your final task, create a new Docker volume named missionstatus on your host machine.

Please note that as soon as you SSH into your docker server to start the activity, immediately sudo to become the root user in order to complete this activity.

Once the volume is created, use the docker cli to display the volume mountpoint on your server. Once you have found the mountpoint, drop to root to move contents found under content-dockerquest-spacebones/volumes/ to local vol directory.

Once this is done, exit root, then start a new container running on port :80 using the base httpd image found in DockerHub, then visit the site in your browser!

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?