I came through the following question:
How to set image name in Dockerfile?
It clearly asks for settings image name in Dockerfile.
The first answer completely answers the question, however, the second one doesn't seem to answer the question:
How to build an image with custom name without using yml file:
docker build -t image_name .
How to run a container with custom name:
docker run -d --name container_name image_name
There's an upvoted comment, which tells:
I've come back to this a couple times, and this answer has helped, despite being technically off-topic
Both the comment and the upvotes on the answer indicate that the answer is really being helpful.
It could be that people who look for "how to build a Docker image" reaches this question, which is irrelevant, but the answer is helpful.
It didn't feel right to me to flag it, neither to downvote. What do you think should be done here?