I wonder if I might ask experienced Docker users here for help.
I’ve been using Docker for a week now and I have created images that build safe_vault for two architectures: amd64 and armv7 (hf).
That’s all good, except that the images are a bit over 1GB in size, which is several times the size they should be as compared to similarly complex images on the Docker hub. It makes them impractical to upload to the Docker repo or distribute to anyone else.
The Dockerfiles that I wrote follow the strategy of git-cloning/downloading each necessary component, compiling and then installing it: base debian image, system tools, gcc, libsodium, rustup, sodiumoxide, safe_vault
I have tried the following:
Follow the recommended practices in writing the Dockerfile: Use a single “RUN” command to clone, compile, install and then delete the source code for each component.
Run docker-squash: https://github.com/goldmann/docker-squash
Run docker-companion: https://github.com/mudler/docker-companion
What do people think? I’d prefer to avoid radical departures such as using a non-debian starting image.