Skip to content

Commit b716c40

Browse files
authored
Merge pull request #371 from vbatts/config_labels
config: adding labels
2 parents ebee8d2 + 6c271ab commit b716c40

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

config.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,16 @@ Note: Any OPTIONAL field MAY also be set to null, which is equivalent to being a
129129
Sets the current working directory of the entrypoint process in the container.
130130
This value acts as a default and is replaced by a working directory specified when creating a container.
131131

132+
- **Labels** *object*, OPTIONAL
133+
134+
The field contains arbitrary metadata for the container.
135+
Labels MUST be a key-value map where both the key and value MUST be strings.
136+
Keys MUST be unique within this map, and best practice is to namespace the keys.
137+
Keys SHOULD be named using a reverse domain notation - e.g. `com.example.myKey`.
138+
Keys using the `org.opencontainers` namespace are reserved and MUST NOT be used by subsequent specifications.
139+
If there are no annotations then this property MAY either be absent or an empty map.
140+
Implementations that are reading/processing this configuration file MUST NOT generate an error if they encounter an unknown annotation key.
141+
132142
- **rootfs** *object*, REQUIRED
133143

134144
The rootfs key references the layer content addresses used by the image.
@@ -209,7 +219,11 @@ Here is an example image configuration JSON document:
209219
"/var/job-result-data": {},
210220
"/var/log/my-app-logs": {}
211221
},
212-
"WorkingDir": "/home/alice"
222+
"WorkingDir": "/home/alice",
223+
"Labels": {
224+
"com.example.project.git.url": "https://example.com/project.git",
225+
"com.example.project.git.commit": "45a939b2999782a3f005621a8d0f29aa387e1d6b"
226+
}
213227
},
214228
"rootfs": {
215229
"diff_ids": [

0 commit comments

Comments
 (0)