I was trying to build an image based on this one, which is based on Debian Stretch, and kept getting this kind of errors when running apt-get update:
W: GPG error: http://security.debian.org stretch/updates InRelease: Couldn't create temporary file /tmp/apt.conf.FNG6R8 for passing config to apt-key
This was fixed after just adding
mkdir /tmp && chmod 777 /tmp \
to the Dockerfile RUN. But then the question is, do Docker images lack the tmp file? Is that the case only for images based on buildpack-deps:stretch-scm? Is there a better way to deal with this than creating by hand a /tmp directory?