Skip to content

Commit d9ffa2f

Browse files
authored
Merge pull request #694 from stevvooe/relax-volumes-specification
config: relax specification of Config.Volumes
2 parents af173bc + 8f42721 commit d9ffa2f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

config.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ 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.
153152
**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.
154153

155154
- **WorkingDir** *string*, OPTIONAL

conversion.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ A compliant configuration converter SHOULD provide a way for users to extract th
9090

9191
1. The runtime configuration does not have a corresponding field for this image field.
9292
However, converters SHOULD set the [`org.opencontainers.image.exposedPorts` annotation](#config.exposedports).
93-
2. If a converter implements conversion for this field using mountpoints, it SHOULD set the `destination` of the mountpoint to the value specified in `Config.Volumes`.
93+
2. Implementations SHOULD provide mounts for these locations such that application data is not written to the container's root filesystem.
94+
If a converter implements conversion for this field using mountpoints, it SHOULD set the `destination` of the mountpoint to the value specified in `Config.Volumes`.
95+
An implementation MAY seed the contents of the mount with data in the image at the same location.
96+
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.
9497
The other `mounts` fields are platform and context dependent, and thus are implementation-defined.
9598
Note that the implementation of `Config.Volumes` need not use mountpoints, as it is effectively a mask of the filesystem.
9699

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)