Monday, 14 December 2020

How to avoid reinstalling packages when building Docker image for Python projects?

 docker run -v $HOME/.cache/pip-docker/:/root/.cache/pip image_1


from : https://stackoverflow.com/questions/25305788/how-to-avoid-reinstalling-packages-when-building-docker-image-for-python-project

No comments:

Post a Comment

How does one detect if one is running within a docker container within Python?

  import os, re path = "/proc/self/cgroup" def is_docker (): if not os.path.isfile(path): return False with open (pa...