0

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?

Comments
  • 2
    I'm not familiar enough with data science terminology, but do you mean dockerfile?
  • 2
    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
  • 2
    It is only important and neccessary when using Docker.
  • 1
    If 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.
  • 1
    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.
  • 0
    @sariel
    Yes DockerFile. It has no extension and can not be given any other names
  • 1
    @atheist
    Haha, 😅 your explanation just dumb's it down for me
  • 1
    @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.
  • 3
    @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
  • 3
    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].
Add Comment