Dockerfile, how install snap, snapd: unrecognized service

first of all, you don’t want to install the “snap” package, as it is not related to “snapd”. Secondly, myself stumbled across this issue of installing snapd within a docker container: TLDR; Running snapd that way is currently not supported. But that question has been asked already at the snapcraft forums. One of snapd’s dependencies … Read more

Docker EXPOSE using run-time environment variables

A little late but you could also use build args and change your code to: FROM python:3.6.5-stretch [ … ] ARG MY_SERVICE_PORT=8080 ARG MY_SERVICE_PORT_RPC=50051 # 8080 and 50051 would be the defaults [ … ] # Still functions like environment variables 🙂 EXPOSE ${MY_SERVICE_PORT} EXPOSE ${MY_SERVICE_PORT_RPC} Then you can build with docker build –build-arg MY_SERVICE_PORT=80 … Read more

Docker buildkit cache location/size and ID

Yes, it is somewhat vague in docker 20.10.5. Could use a pull request or two to update documentation. The docker driver cache uses the same storage driver as used for image layers. Metadata is stored in databases at /var/lib/docker/buildkit. When docker uses overlay2 storage driver, the layer is in /var/lib/docker/overlay2/<ID>/diff/. For <ID>, see below. /var/lib/docker … Read more