Reputation: 675
I like the concept of dockerfile
The problem is, sometimes the download link to the dockerfile can be obsolete or lost or deleted.
So isn't it better to have the exported/saved version of docker image instead for consistency purposes?
What's the pros and cons? Other than needing to trust the source of the exported / saved image.
Would like to hear some opinion / discussion regarding this.
Upvotes: 1
Views: 120
Reputation: 9455
You need both ;), you usually have a cached version of your docker image (use one of the index services), but you always need a dockerfile to be able to rebuild/upgrade the image when needed.
Upvotes: 1
Reputation: 5208
Yes, I sometimes do the download outside the Dockerfile - in a Makefile before hand, or vendor it in my github repo.
it all depends on what you need, and what you're getting - I feel relatively comfortable with having my Dockerfile downlad an old Linux release from http://kernel.org :)
so yes, it totally depends.
Upvotes: 1