QuestionQ53

VerifiedContainer Virtualization

What occurs when the following command is run twice consecutively?

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

Explanation

data is a named Docker volume. Docker creates it on the first run if necessary and mounts that same volume at /data in both containers. Volume mounts are read-write by default unless ro is specified, so either container can modify the content and those modifications are visible to the other container.

Learn more

Community Discussion

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