1. Learn
  2. /
  3. Courses
  4. /
  5. Intermediate Docker

Connected

Exercise

Different containers, same volume

After learning more about container volumes, your team comes up with the idea of trying to share data between containers using a volume. You volunteer to experiment with this idea further.

A shared volume is already configured and there is currently one container running with the volume mounted.

Instructions 1/3

undefined XP
  • 1
    • Determine the name of the available volume using the appropriate docker command.
  • 2
    • Start one alpine:3.19.2 container with the command: docker run -v volumename:/data -it alpine:3.19.2 ls /data. Make sure to change the volumename to the correct entry.
  • 3
    • Press the up arrow key once to select the previous docker run command without retyping it and run it once more.