You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: layer.md
+40-20Lines changed: 40 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -252,32 +252,22 @@ In all other cases, the implementation MUST do the semantic equivalent of the fo
252
252
The following is a base layer with several resources:
253
253
254
254
```text
255
-
a/
256
-
a/b/
257
-
a/b/c/
258
-
a/b/c/bar
255
+
file1
256
+
a/file2
257
+
b/
258
+
c/file3
259
259
```
260
260
261
-
When the next layer is created, the original `a/b` directory is deleted and recreated with `a/b/c/foo`:
261
+
If we then delete `file1`, `file2`, and `b/`, while leaving `file3` and adding `file4, the next layer looks like:
262
262
263
263
```text
264
-
a/
265
-
a/.wh..wh..opq
266
-
a/b/
267
-
a/b/c/
268
-
a/b/c/foo
264
+
.wh.file1
265
+
a/.wh.file2
266
+
.wh.b
267
+
file4
269
268
```
270
269
271
-
When processing the second layer, `a/.wh..wh..opq` is applied first, before creating the new version of `a/b`, regardless of the ordering in which the whiteout file was encountered.
272
-
For example, the following layer is equivalent to the layer above:
273
-
274
-
```text
275
-
a/
276
-
a/b/
277
-
a/b/c/
278
-
a/b/c/foo
279
-
a/.wh..wh..opq
280
-
```
270
+
Note that regardless of the path being deleted, the whiteout file is a regular file in the archive.
281
271
282
272
Implementations SHOULD generate layers such that the whiteout files appear before sibling directory entries.
283
273
@@ -322,6 +312,36 @@ Note that this opaque file will apply to _all_ children, including sub-directori
322
312
323
313
Implementations SHOULD generate layers using _explicit whiteout_ files, but MUST accept both.
324
314
315
+
As another example, consider the following base layer:
316
+
317
+
```text
318
+
a/
319
+
a/b/
320
+
a/b/c/
321
+
a/b/c/bar
322
+
```
323
+
324
+
When the next layer is created, the original `a/b` directory is deleted and recreated with `a/b/c/foo`:
325
+
326
+
```text
327
+
a/
328
+
a/.wh..wh..opq
329
+
a/b/
330
+
a/b/c/
331
+
a/b/c/foo
332
+
```
333
+
334
+
When processing the second layer, `a/.wh..wh..opq` is applied first, before creating the new version of `a/b`, regardless of the ordering in which the whiteout file was encountered.
335
+
For example, the following layer is equivalent to the layer above:
336
+
337
+
```text
338
+
a/
339
+
a/b/
340
+
a/b/c/
341
+
a/b/c/foo
342
+
a/.wh..wh..opq
343
+
```
344
+
325
345
Any given image is likely to be composed of several of these Image Filesystem Changeset tar archives.
0 commit comments