Skip to content

Commit

Permalink
config: relax specification of Config.Volumes
Browse files Browse the repository at this point in the history
Relaxes the specification of `Config.Volumes` by avoiding references to
the concept of "data volumes". Implementors are merely instructed to
provide mounts outside the container's root filesystem.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
  • Loading branch information
stevvooe committed Jun 21, 2017
1 parent 6772079 commit d4cf636
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ Note: Any OPTIONAL field MAY also be set to null, which is equivalent to being a

- **Volumes** *object*, OPTIONAL

A set of directories which SHOULD be created as data volumes in a container running this image.
If a file or folder exists within the image with the same path as a data volume, that file or folder will be replaced by the data volume and never be merged.
A set of directories describing where the process is likely write data specific to a container instance.
Implementations SHOULD provide mounts for these locations such that application data is not written to the container's root filesystem.
If a _new_ image is created from a container based on the image described by this configuration, data in these paths SHOULD NOT be included in the _new_ image.
**NOTE:** This JSON structure value is unusual because it is a direct JSON serialization of the Go type `map[string]struct{}` and is represented in JSON as an object mapping its keys to an empty object.

- **WorkingDir** *string*, OPTIONAL
Expand Down
2 changes: 1 addition & 1 deletion specs-go/v1/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type ImageConfig struct {
// Cmd defines the default arguments to the entrypoint of the container.
Cmd []string `json:"Cmd,omitempty"`

// Volumes is a set of directories which should be created as data volumes in a container running this image.
// Volumes is a set of directories describing where the process is likely write data specific to a container instance.
Volumes map[string]struct{} `json:"Volumes,omitempty"`

// WorkingDir sets the current working directory of the entrypoint process in the container.
Expand Down

0 comments on commit d4cf636

Please sign in to comment.