Skip to content

Instantly share code, notes, and snippets.

@twaugh
Created March 11, 2016 16:38
Show Gist options
  • Save twaugh/6b656e9dc8e0db12394b to your computer and use it in GitHub Desktop.
Save twaugh/6b656e9dc8e0db12394b to your computer and use it in GitHub Desktop.
squash traceback
# cat Dockerfile
FROM fedora
RUN dnf install -y ghostscript-core
RUN dnf install -y ghostscript-cups
CMD /bin/env
LABEL foo=bar
# docker history test
IMAGE CREATED CREATED BY SIZE COMMENT
368d9c088d14 2 minutes ago /bin/sh -c #(nop) LABEL foo=bar 0 B
5c94a39d6eba 2 minutes ago /bin/sh -c #(nop) CMD ["/bin/sh" "-c" "/bin/e 0 B
82136d9ef972 2 minutes ago /bin/sh -c dnf install -y ghostscript-cups 35.1 MB
fc675bf644f1 10 minutes ago /bin/sh -c dnf install -y ghostscript-core 199.5 MB
ddd5c9c1d0f2 6 days ago /bin/sh -c #(nop) ADD file:bcb5e5cddd4c4d1cac 204.7 MB
<missing> 6 days ago /bin/sh -c #(nop) MAINTAINER Patrick Uiterwij 0 B
# docker-scripts -v squash test -t test:squashed -f 32016-03-11 16:36:28,495 root DEBUG Running version 1.0.0a1
2016-03-11 16:36:28,495 docker.auth.auth DEBUG File doesn't exist
2016-03-11 16:36:28,504 requests.packages.urllib3.connectionpool DEBUG "GET /version HTTP/1.1" 200 208
2016-03-11 16:36:28,506 requests.packages.urllib3.connectionpool DEBUG "GET /v1.22/_ping HTTP/1.1" 200 2
2016-03-11 16:36:28,507 requests.packages.urllib3.connectionpool DEBUG "GET /v1.22/version HTTP/1.1" 200 208
2016-03-11 16:36:28,508 root INFO docker-scripts version 1.0.0a1, Docker c3959b1, API 1.22...
2016-03-11 16:36:28,508 root INFO Using v2 image format
2016-03-11 16:36:28,508 root DEBUG Using /tmp/docker-squash-UEZhr6 as the temporary directory
2016-03-11 16:36:28,511 requests.packages.urllib3.connectionpool DEBUG "GET /v1.22/images/test/json HTTP/1.1" 200 1610
2016-03-11 16:36:28,514 requests.packages.urllib3.connectionpool DEBUG "GET /v1.22/images/sha256%3A368d9c088d1438deeda7f147f73503819441a6a8ae4aef97c0a112c7c63e8f25/history HTTP/1.1" 200 1248
2016-03-11 16:36:28,514 root INFO Old image has 6 layers
2016-03-11 16:36:28,514 root DEBUG Old layers: [u'<missing>', u'sha256:ddd5c9c1d0f2a08c5d53958a2590495d4f8a6166e2c1331380178af425ac9f3c', u'sha256:fc675bf644f1996af08f9e81ee3209e5d0d0df5ea58b015651562e5f9ec68e3a', u'sha256:82136d9ef9722d68a4a264574f376b6562e7a08cfa4773b3e37ed765d7660709', u'sha256:5c94a39d6eba7b98ac6be54230729beaa53d4a2b4e7e332f0bc69368bdc0fc28', u'sha256:368d9c088d1438deeda7f147f73503819441a6a8ae4aef97c0a112c7c63e8f25']
2016-03-11 16:36:28,514 root INFO Checking if squashing is necessary...
2016-03-11 16:36:28,515 root INFO Attempting to squash last 3 layers...
2016-03-11 16:36:28,515 root DEBUG Layers to squash: [u'sha256:82136d9ef9722d68a4a264574f376b6562e7a08cfa4773b3e37ed765d7660709', u'sha256:5c94a39d6eba7b98ac6be54230729beaa53d4a2b4e7e332f0bc69368bdc0fc28', u'sha256:368d9c088d1438deeda7f147f73503819441a6a8ae4aef97c0a112c7c63e8f25']
2016-03-11 16:36:28,515 root INFO Saving image sha256:368d9c088d1438deeda7f147f73503819441a6a8ae4aef97c0a112c7c63e8f25 to /tmp/docker-squash-UEZhr6/old/image.tar file...
2016-03-11 16:36:28,515 root DEBUG Try #1...
2016-03-11 16:36:36,404 requests.packages.urllib3.connectionpool DEBUG "GET /v1.22/images/sha256%3A368d9c088d1438deeda7f147f73503819441a6a8ae4aef97c0a112c7c63e8f25/get HTTP/1.1" 200 None
2016-03-11 16:36:48,166 root INFO Image saved!
2016-03-11 16:36:49,105 root INFO Unpacking /tmp/docker-squash-UEZhr6/old/image.tar tar file to /tmp/docker-squash-UEZhr6/old directory
2016-03-11 16:36:51,860 root DEBUG Removing exported tar (/tmp/docker-squash-UEZhr6/old/image.tar)...
2016-03-11 16:36:51,891 root INFO Archive unpacked!
2016-03-11 16:36:51,891 root INFO Squashing image 'test'...
2016-03-11 16:36:51,891 root DEBUG Reading '/tmp/docker-squash-UEZhr6/old/manifest.json' JSON file...
2016-03-11 16:36:51,893 root DEBUG Reading '/tmp/docker-squash-UEZhr6/old/368d9c088d1438deeda7f147f73503819441a6a8ae4aef97c0a112c7c63e8f25.json' JSON file...
2016-03-11 16:36:51,895 root INFO Starting squashing...
2016-03-11 16:36:51,895 root INFO Squashing file '/tmp/docker-squash-UEZhr6/old/48c0a845e000540b7da0e89975f4dc3428c0cada24b9471773d553054c9dedda/layer.tar'...
2016-03-11 16:36:51,896 root DEBUG Searching for marker files in '/tmp/docker-squash-UEZhr6/old/48c0a845e000540b7da0e89975f4dc3428c0cada24b9471773d553054c9dedda/layer.tar' archive...
2016-03-11 16:36:52,373 root INFO Squashing finished!
Traceback (most recent call last):
File "/usr/bin/docker-scripts", line 9, in <module>
load_entry_point('docker-scripts==1.0.0a1', 'console_scripts', 'docker-scripts')()
File "build/bdist.linux-x86_64/egg/docker_scripts/cli.py", line 97, in run
File "build/bdist.linux-x86_64/egg/docker_scripts/cli.py", line 89, in run
File "build/bdist.linux-x86_64/egg/docker_scripts/cli.py", line 32, in run_squash
File "build/bdist.linux-x86_64/egg/docker_scripts/squash.py", line 68, in run
File "build/bdist.linux-x86_64/egg/docker_scripts/image.py", line 66, in squash
File "build/bdist.linux-x86_64/egg/docker_scripts/v2_image.py", line 50, in _squash
File "build/bdist.linux-x86_64/egg/docker_scripts/v2_image.py", line 242, in _generate_squashed_layer_path_id
AttributeError: 'V2Image' object has no attribute 'squash_id'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment