Creating Data Containers

1 hour
  • 2 Learning Objectives

About this Hands-on Lab

Welcome back, brave adventurer! As we approach the end of our quest to supply the nation of SpaceBones with much-needed treats, there is yet another challenge that can only be solved with your extensive Docker expertise. Now that first contact via SpaceBones: The Website has been confirmed, we now need your help to prepare SpaceBones infrastructure to not only receive but also retain any response from the Droolidian government.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create Boneyard Data Container

Create a new data container named boneyard. This can be done via the following command:

docker create -v /data --name boneyard spacebones/postgres /bin/true
Create the Three Containers to Mount Data Container

Create three containers using the spacebones/postgres Docker image with the following names:

  • cheese
  • bacon
  • tuna

You can accomplish this goal with the following commands:

docker run -d --volumes-from boneyard --name cheese spacebones/postgres
docker run -d --volumes-from boneyard --name tuna spacebones/postgres
docker run -d --volumes-from boneyard --name bacon spacebones/postgres

Additional Resources

After consulting with the Radar Board (the official SpaceBones technology team), we have decided the best option for sharing data between several containers will be Docker data containers. As our resident Docker expert, we are counting on you to create a data container running the training/postgres image (for our purposes, name that data container boneyard) and then mount the data container on three app containers (also running training/postgres) with the following names:

  • cheese
  • tuna
  • bacon

Good luck, brave one! We are rooting for you!

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?