minus-squarebjorney@lemmy.catoComics@lemmy.ml•On a missionlinkfedilinkarrow-up28·7 days ago linkfedilink
minus-squarebjorney@lemmy.catoPython@programming.dev•ELI5 Using python virtual environment in docker container.linkfedilinkarrow-up10·edit-215 days agoIt’s not necessary but there is no reason not to. Pros: production and development programs are more similar upgrading your base image won’t affect your python packages you can use multi stage builds to create drastically smaller final images Cons: you have to type venv/bin/python3 instead of just python3 in the run line of your dockerfile linkfedilink