Install minimal dependencies with apt I have a simple Dockerfile which looks like the following

FROM debian:stretch-slim as builder
COPY . my_project/
RUN apt-get update &amp;&amp; apt-get install -y build-essential libpqxx-dev libtbb-dev


Running this with docker build -t test_proj . I was dismayed to see that apt is trying to install a huge amount (583MB unpacked) of extra libs, including things like python and sqlite (which sound completely unnecessary for pqxx and tbb). I ran apt-rdepends over each and sure enough neither python nor sqlite were in there, so there are surely more 'spurious' libs being installed by apt

Why is this happening and how can I avoid this? I plan to use a multistage  to ditch the build tools by the final image anyway, but this is slowing down builds so I'd like to fix it
Have you heard about the distroless? 
See this link too.