re: Docker: What it is and How to Use it With Python VIEW POST


What is the difference between an image and a volume? When to use what?


Image keeps all necessary binaries and libraries to be able to run required application, it could be described in Dockerfile. When you start new container it’s created from this image. To effectively utilize hardware resources data in containers should be immutable. In other words containers shouldn’t keep data produced by application you run inside container. And volume is directory mounted to container which keeps mutable data. You can think of it as a shared folder in virtual machine

code of conduct - report abuse