If we want to make a rollback and remove the last layer (maybe the file should be called c.txt instead of b.txt)
we can do
so by tagging the layer 9977b78fbad7:
$ docker tag 9977b test/b
Let’s take a look at the new history:
$ docker history test/b
IMAGE CREATED CREATED BY SIZE
9977b78fbad7 3 hours ago /bin/sh -c apt-get install -y apache2 54.17 MB
e83b3bf07b42 3 hours ago /bin/sh -c apt-get update 20.67 MB
9cd978db300e 3 months ago /bin/sh -c #(nop) ADD precise.tar.xz in / 204.4 MB
6170bb7b0ad1 3 months ago /bin/sh -c #(nop) MAINTAINER Tianon Gravi <ad 0 B
511136ea3c5a 10 months ago 0 B
Our last layer is gone and with the layer the text file b.txt!
网友评论