DEV Community

Discussion on: How to deploy python-ldap in Production Docker Image

Collapse
 
florian_courouge profile image
Courouge

I use multi-stage build to reduce image size and benefit layer caching. In case of virtual environment, I just divide the build stage with pip dependencies and the run stage to reduce attack surface. I'm not a expert on this part but you could find some links that explain why I am using multistage :)
sysdig.com/blog/dockerfile-best-pr...
docker.com/blog/containerized-pyth...