Open marc1uk opened 6 years ago
I also experienced this, and also was a problem under /var/cache/yum
, for a centos
based container.
I removed the file inside the container, and tried again, but got an error about a different file. I eventually removed all of /var/cache/yum
, and then the diff worked for me.
Note that there had been a lot of activity within the container, and obviously yum
was used to install some extra packages at runtime.
I only encountered it (so far) on this one container instance.
Note: I am running 18.05.0-ce on a Ubuntu 16.04 host using overlay2 storage driver.
In my case, upgrading cpp
, gcc
, libgcc
, libgomp
always breaks docker diff
.
[user@dev ~]$ docker exec -it ee0ad6f6b0ba bash [root@ee0ad6f6b0ba /]# uname -a Linux ee0ad6f6b0ba 5.3.15-200.fc30.x86_64 #1 SMP Thu Dec 5 15:18:00 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux [root@ee0ad6f6b0ba /]# dnf upgrade libgomp Last metadata expiration check: 0:03:34 ago on Fri 11 Feb 2022 02:05:40 AM UTC. Dependencies resolved. ================================================================================================================================================================================== Package Architecture Version Repository Size ================================================================================================================================================================================== Upgrading: cpp x86_64 8.5.0-4.el8_5 appstream 10 M gcc x86_64 8.5.0-4.el8_5 appstream 23 M libgcc x86_64 8.5.0-4.el8_5 baseos 79 k libgomp x86_64 8.5.0-4.el8_5 baseos 206 k Transaction Summary ================================================================================================================================================================================== Upgrade 4 Packages Total download size: 34 M Is this ok [y/N]: y Downloading Packages: (1/4): libgcc-8.5.0-4.el8_5.x86_64.rpm 65 kB/s | 79 kB 00:01 (2/4): libgomp-8.5.0-4.el8_5.x86_64.rpm 462 kB/s | 206 kB 00:00 (3/4): cpp-8.5.0-4.el8_5.x86_64.rpm 1.2 MB/s | 10 MB 00:09 (4/4): gcc-8.5.0-4.el8_5.x86_64.rpm 1.4 MB/s | 23 MB 00:17 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 2.0 MB/s | 34 MB 00:17 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Upgrading : libgomp-8.5.0-4.el8_5.x86_64 1/8 Running scriptlet: libgomp-8.5.0-4.el8_5.x86_64 1/8 Upgrading : libgcc-8.5.0-4.el8_5.x86_64 2/8 Running scriptlet: libgcc-8.5.0-4.el8_5.x86_64 2/8 Upgrading : cpp-8.5.0-4.el8_5.x86_64 3/8 Running scriptlet: cpp-8.5.0-4.el8_5.x86_64 3/8 Upgrading : gcc-8.5.0-4.el8_5.x86_64 4/8 Running scriptlet: gcc-8.5.0-4.el8_5.x86_64 4/8 Running scriptlet: gcc-8.4.1-1.el8.x86_64 5/8 Cleanup : gcc-8.4.1-1.el8.x86_64 5/8 Running scriptlet: cpp-8.4.1-1.el8.x86_64 6/8 Cleanup : cpp-8.4.1-1.el8.x86_64 6/8 Cleanup : libgcc-8.4.1-1.el8.x86_64 7/8 Running scriptlet: libgcc-8.4.1-1.el8.x86_64 7/8 Running scriptlet: libgomp-8.4.1-1.el8.x86_64 8/8 Cleanup : libgomp-8.4.1-1.el8.x86_64 8/8 Running scriptlet: libgomp-8.4.1-1.el8.x86_64 8/8 Verifying : cpp-8.5.0-4.el8_5.x86_64 1/8 Verifying : cpp-8.4.1-1.el8.x86_64 2/8 Verifying : gcc-8.5.0-4.el8_5.x86_64 3/8 Verifying : gcc-8.4.1-1.el8.x86_64 4/8 Verifying : libgcc-8.5.0-4.el8_5.x86_64 5/8 Verifying : libgcc-8.4.1-1.el8.x86_64 6/8 Verifying : libgomp-8.5.0-4.el8_5.x86_64 7/8 Verifying : libgomp-8.4.1-1.el8.x86_64 8/8 Upgraded: cpp-8.5.0-4.el8_5.x86_64 gcc-8.5.0-4.el8_5.x86_64 libgcc-8.5.0-4.el8_5.x86_64 libgomp-8.5.0-4.el8_5.x86_64 Complete! [root@ee0ad6f6b0ba /]# exit exit
docker diff
shows not a directory
error
[user@dev ~]$ docker diff ee0ad6f6b0ba Error response from daemon: stat /mnt/data/docker/overlay2/2e1a7d62552651c9dd9435ea96a44431c4645a22c1e8177659f16056c147cc94/diff/usr/lib/.build-id/f4/ab03961fed72ed3181a4bec36cc3d22c3cf16a: not a directory
Expected behavior
docker diff will show history of layers and their changes
Actual behavior
docker diff prints a stat error from the daemon:
Error response from daemon: stat /var/lib/docker/overlay2/9daff4cb70ea36ecfef43d41bd02bc829ec9fac93da01e5787b3fee68a9d810e/diff/var/cache/yum/x86_64: not a directory
Steps to reproduce the behavior
Make a docker image Make some changes Run
docker diff ${imagename}
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.) standard physical machine.