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!
docker image version rollback
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...