This is a grand oversimplification/misconception.
The Dockerfile is just a description on how to build a container image. Running a container on an engine is a different story.
This is a grand oversimplification/misconception.
The Dockerfile is just a description on how to build a container image. Running a container on an engine is a different story.
It's not reasonable at all. If someone is trying to learn Docker and they read this misleading article, they will think they can somehow run their Dockerfile as a container, and they will be wholly confused as to why it's not going to work out.
I create my docker images with Bazel/crane [1]. (For reproducibility.)
There are no Dockerfiles at all.
---
The .py example is bad because there is nothing else (AFAIK) that produces .pyc.
A pedant might similarly go the other way and say "C isn't just a compiled language, because personally I use the Ch C interpreter".
I don't think it's a good enough reason to avoid reasonable simplifications in technical writing because "Well actually, advanced users have an edge case where that assumption doesn't strictly hold....". The only way for anyone to get a reasonable understanding of anything complex is by starting with small simplifications and generalizations.
Even for a beginner, that's unhelpful. They're going to expect
docker run DockerfileBut you cannot run a Dockerfile, in the same way you cannot run a C++ source file as an executable. It needs to be compiled first.
But, yeah, if the article wanted to clarify instead of obscuring the functionality of Docker, the one we know and use, then saying that it runs the Dockerfile is misleading. I mean, it does run it to builds an image, that's how it build the image, but then readers need an explanation for why there are images and why do they need them, if all they do is running Dockerfiles, and that's where the "explanation" becomes worthless.
The article is incorrect. If you don't download or build the Docker image from the Dockerfile, you will not be able to run a container from the Dockerfile alone.