QuestionQ29

Verified702.1 Application Container Management

What occurs when the following command is run twice consecutively?

docker run -tid -v data:/data debian bash

Explanation

A named volume can be mounted by multiple containers simultaneously. Docker creates the named volume if it does not exist and reuses it when the same volume name is mounted again. Because no read-only option is supplied, both containers mount data read-write at /data, so each can modify the shared contents and observe the other container’s changes.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!