stashfree
stashfree

Reputation: 675

Dockerfile necessary? Advisable?

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

Answers (2)

Vitaly Kushner
Vitaly Kushner

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

SvenDowideit
SvenDowideit

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

Related Questions