Skip to content

Commit f211f5f

Browse files
committed
config: relax specification of Config.Volumes
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>
1 parent df6f3c5 commit f211f5f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

config.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,9 @@ Note: Any OPTIONAL field MAY also be set to null, which is equivalent to being a
148148

149149
- **Volumes** *object*, OPTIONAL
150150

151-
A set of directories which SHOULD be created as data volumes in a container running this image.
152-
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.
151+
A set of directories describing where the process is likely write data specific to a container instance.
152+
Implementations SHOULD provide mounts for these locations such that application data is not written to the container's root filesystem.
153+
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.
153154
**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.
154155

155156
- **WorkingDir** *string*, OPTIONAL

specs-go/v1/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type ImageConfig struct {
3737
// Cmd defines the default arguments to the entrypoint of the container.
3838
Cmd []string `json:"Cmd,omitempty"`
3939

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

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

0 commit comments

Comments
 (0)