mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Merge pull request #11688 from afewremarks/master
RE: Issue #6114. Updated docs to reflect docker inpsect for volumes
This commit is contained in:
		
						commit
						d827b4d235
					
				
					 1 changed files with 21 additions and 0 deletions
				
			
		| 
						 | 
					@ -52,6 +52,27 @@ This will create a new volume inside a container at `/webapp`.
 | 
				
			||||||
> You can also use the `VOLUME` instruction in a `Dockerfile` to add one or
 | 
					> You can also use the `VOLUME` instruction in a `Dockerfile` to add one or
 | 
				
			||||||
> more new volumes to any container created from that image.
 | 
					> more new volumes to any container created from that image.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Locating a volume
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You can locate the volume on the host by utilizing the 'docker inspect' command.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    $ docker inspect web
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The output will provide details on the container configurations including the
 | 
				
			||||||
 | 
					volumes. The output should look something similar to the following:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ...
 | 
				
			||||||
 | 
					    "Volumes": {
 | 
				
			||||||
 | 
					        "/webapp": "/var/lib/docker/volumes/fac362...80535"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "VolumesRW": {
 | 
				
			||||||
 | 
					        "/webapp": true
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    ...
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You will notice in the above 'Volumes' is specifying the location on the host and 
 | 
				
			||||||
 | 
					'VolumesRW' is specifying that the volume is read/write.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Mount a Host Directory as a Data Volume
 | 
					### Mount a Host Directory as a Data Volume
 | 
				
			||||||
 | 
					
 | 
				
			||||||
In addition to creating a volume using the `-v` flag you can also mount a
 | 
					In addition to creating a volume using the `-v` flag you can also mount a
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue