Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
It builds the docker image from the file, which lists which base to use, what to install/run/use and anything about the image that will eventually be created
-
atheist98222yIf you share your code, a dockerfile is just a way to share your execution environment. Like python's requirements file, but for an entire system.
-
Can we substitute Docker with containerization, please...
Cause that's the topic that's relevant ...
Docker is just one implementation, the why / how / possibilities are not limited to Docker exclusively, quite the other way around. -
@Ohiorenua nope.
A Dockerfile could be called "MyHugeBalls".
You would just need to change the file argument of the docker CLI.
File extensions are pretty meaningless, same for naming. -
sariel85342y@Ohiorenua think of a dockerfile like a tech recipe.
It sets up your environment with all the software and packages you need to accomplish a goal. Dockerfile is just a part of the equation though. These files build container images (images like a disc image, not a picture).
Images can be shared though an image repo, like Docker Hub. If an image is available for you to pull(download) you can reference it instead of building one locally based off of the dockerfile you have. This can sometimes save disk space and time.
@IntrusionCM every one of my new projects that has a dockerfile will now be dubbed "MyHugeBalls". Thank you -
Like @sariel said, a Dockerfile is a recipe that describes "how to build an image".
You can either read the recipe and execute all the commands manually, or you can feed it to some application, like docker, to read that file and execute it for you. Docker will cook the image described in that recipe and it will be a nice looking image.
Depending on how the Dockerfile is written, it should always yield the same image, no matter how many times you build it [exceptions apply].
Related Rants
So, I don't get the concept of dockfile. I understand it and what it does but, I learnt about it a few weeks back. Is it so important and necessary?
question
dockfile
collab
data science
environment