Add whiteout handling by switching to a two-phase approach. (#139)

* Add whiteout handling by switching to a two-phase approach.

Also only handle hardlinks within one layer

* Simplify the run test.
This commit is contained in:
dlorenc
2018-04-23 12:50:21 -07:00
committed by GitHub
parent 7ceba77ef0
commit 844d9ef0d9
10 changed files with 107 additions and 60 deletions
@@ -0,0 +1,3 @@
FROM busybox
ADD context/tars /tmp/tars
RUN mv /tmp/tars /foo
@@ -14,6 +14,6 @@
FROM gcr.io/google-appengine/debian9
RUN echo "hey" > /etc/foo
RUN apt-get update && apt-get install -y \
bzr \
cvs \
RUN echo "baz" > /etc/baz
RUN cp /etc/baz /etc/bar
RUN rm /etc/baz
@@ -0,0 +1,12 @@
[
{
"Image1": "gcr.io/kaniko-test/docker-test-mv-add:latest",
"Image2": "gcr.io/kaniko-test/kaniko-test-mv-add:latest",
"DiffType": "File",
"Diff": {
"Adds": null,
"Dels": null,
"Mods": null
}
}
]
@@ -6,43 +6,7 @@
"Diff": {
"Adds": null,
"Dels": null,
"Mods": [
{
"Name": "/var/log/dpkg.log",
"Size1": 57481,
"Size2": 57481
},
{
"Name": "/var/log/apt/term.log",
"Size1": 23671,
"Size2": 23671
},
{
"Name": "/var/cache/ldconfig/aux-cache",
"Size1": 8057,
"Size2": 8057
},
{
"Name": "/var/log/apt/history.log",
"Size1": 5661,
"Size2": 5661
},
{
"Name": "/var/log/alternatives.log",
"Size1": 2579,
"Size2": 2579
},
{
"Name": "/usr/lib/python2.7/dist-packages/keyrings/__init__.pyc",
"Size1": 140,
"Size2": 140
},
{
"Name": "/usr/lib/python2.7/dist-packages/lazr/__init__.pyc",
"Size1": 136,
"Size2": 136
}
]
"Mods": null
}
}
]