Creating Data Containers

Hands-On Lab

 

Length

01:00:00

Difficulty

Intermediate

Creating Data Containers 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 not only to receive, but retain any response from Droolidian government.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

instructions

Use the spacebones/postgres image to create a data container named boneyard as well as three running app containers with the following names:

  • cheese

  • bacon

  • tuna

  • create postgres data container

docker create -v /data --name boneyard spacebones/postgres /bin/true
  • mount boneyard on 3 containers
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