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

Aperta
#18,993 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Documentazione
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
docker
Ambito
documentation

Direzione di ricerca

Inizia dalla documentazione disponibile all’indirizzo docs.docker.com/storage/volumes/ e confronta la sua spiegazione dei volumi con la parola chiave VOLUME di Dockerfile e gli esempi di --mount. Chiarisci le differenze tra Windows, macOS e PC, inclusi i percorsi relativi e assoluti, le posizioni sull’host e gli errori riportati. Il lavoro è completo quando un nuovo utente può capire quando è necessario VOLUME e come si comportano i percorsi dei volumi su ciascuna piattaforma.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

agent/skip agent/triaged area/build area/storage lifecycle/frozen
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

Lingua principale
Markdown
Stelle
4.7k
Fork
8.5k
Merge medio
2g 12h
PR unite (30g)
104

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di docker/docs

Tutte le issue di docker/docs

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.