docker / docker/docs

Clarify docker volumes and their differences on windows, pc, and mac

Open
#18,993 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

agent/skip agent/triaged area/build area/storage lifecycle/frozen
Dominant language
Markdown
Stars
4.7k
Forks
8.5k
Avg merge
2d 18h
Merged PRs (30d)
108

Description

Is this a docs issue?
  • My issue is about the documentation content or website
Type of issue

I can't find what I'm looking for

Description

I find the discussion of docker volumes very confusing. This person has helpfully written a gist here: https://gist.github.com/onlyphantom/0bffc5dcc25a756e247cb526c01072c0 with some extra info, however it still doesn't really explain the basics of what I am looking for.

  1. How do docker volumes as discussed in https://docs.docker.com/storage/volumes/ relate to the VOLUME keyword in the DockerFile?
  2. I am new to all this, but it isn't clear to me if I need to have a VOLUME specified in the dockerfile or not, and if I do what this does? Does it make changes to the host system that the image is built on by adding a volume? Does it add a volume when image is run as a container onto the container host?
  3. I am on a mac and docker volume ls reports directories that do not exist? Can this be explained somewhere in the documentation?
  4. when I use the commandline options as suggested for --mount I get errors that are meaningless to me. For example, the claim that I am not specifying an absolute path when I clearly am. Could this be documented in an FAQ somewhere?
  5. what does it mean on a mac to set src=<relative_path>? Is this relative path relative to the path used by docker to store volumes? Where is that? Also, what then would be the meaning of the absolute path? My impression is that there is some missing information in the documentation on how this fits together.

Apologies, I am sure the answers to these questions are present. I just thought I ought to give the feedback of a thoroughly confused new user.

Location

https://docs.docker.com/storage/volumes/

Suggestion

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the documentation at docs.docker.com/storage/volumes/ and compare its explanation of volumes with the Dockerfile VOLUME keyword and --mount examples. Clarify the differences across Windows, macOS, and PC, including relative and absolute paths, host locations, and reported errors. Done means a new user can understand when VOLUME is needed and how volume paths behave on each platform.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.