I am trying to get a good understanding of Docker best practices and to clarify what is the difference between:
- sharing the
Dockerfile(specs/build configuration) including language specific config file (such asrequirements.txtfor Python orpackage.jsonfor Node ).
and
- creating and sharing a Docker image via a registry (e.g Docker Hub) ?
In the first case the user needs to clone the repo to get the specs and run the docker build to create an image.
_
What would be the general best practice for storing and sharing "Docker code" (for the lack of better term) when getting started with Docker or working on personal projects?
In which situation would it be preferred to share a built image via the registry?