The "Permission denied" message is caused by script file "/etc/apt/apt.conf.d/docker-clean":
...
$ cat /etc/apt/apt.conf.d/docker-clean
# Since for most Docker users, package installs happen in "docker build" steps,
# they essentially become individual layers due to the way Docker handles
# layering, especially using CoW filesystems. What this means for us is that
# the caches that APT keeps end up just wasting space in those layers, making
# our layers unnecessarily large (especially since we'll normally never use
# these caches again and will instead just "docker build" again and make a brand
# new image).
# Ideally, these would just be invoking "apt-get clean", but in our testing,
# that ended up being cyclic and we got stuck on APT's lock, so we get this fun
# creation that's essentially just "apt-get clean".
DPkg::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };
APT::Update::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };
"APT::Update::Post-Invoke" will be spawned after the "upgrade" operation by "apt_pkg". Here it will always "rm -f /var/cache/apt/archives/partial/*.deb" no matter how we set the "rootdir". Thus caused the error message "Permission denied". It is harmless.
The "Permission denied" message is caused by script file "/etc/apt/ apt.conf. d/docker- clean": apt.conf. d/docker- clean
...
$ cat /etc/apt/
# Since for most Docker users, package installs happen in "docker build" steps,
# they essentially become individual layers due to the way Docker handles
# layering, especially using CoW filesystems. What this means for us is that
# the caches that APT keeps end up just wasting space in those layers, making
# our layers unnecessarily large (especially since we'll normally never use
# these caches again and will instead just "docker build" again and make a brand
# new image).
# Ideally, these would just be invoking "apt-get clean", but in our testing, apt/archives/ *.deb /var/cache/ apt/archives/ partial/ *.deb /var/cache/ apt/*.bin || true"; }; :Post-Invoke { "rm -f /var/cache/ apt/archives/ *.deb /var/cache/ apt/archives/ partial/ *.deb /var/cache/ apt/*.bin || true"; };
# that ended up being cyclic and we got stuck on APT's lock, so we get this fun
# creation that's essentially just "apt-get clean".
DPkg::Post-Invoke { "rm -f /var/cache/
APT::Update:
Dir::Cache: :pkgcache ""; :srcpkgcache "";
Dir::Cache:
# Note that we do realize this isn't the ideal way to do this, and are always /github. com/debuerreoty pe/debuerreotyp e/issues).
# open to better suggestions (https:/
...
"APT::Update: :Post-Invoke" will be spawned after the "upgrade" operation by "apt_pkg". Here it will always "rm -f /var/cache/ apt/archives/ partial/ *.deb" no matter how we set the "rootdir". Thus caused the error message "Permission denied". It is harmless.