Hacker News new | ask | show | jobs
by johanbcn 759 days ago
It's explained on the official documentation: https://docs.docker.com/reference/dockerfile/#scope
1 comments

True, though gotchas exist when user intuition doesn't match with actual behavior regardless of whether they are mentioned in docs.
Principle of least surprise.

If you need to write in the docs about a surprise that a user otherwise wouldn't have expected, may be it's a sign that the surprise should be fixed up such that it's not surprising behaviour.