Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I interpret each directive in a Dockerfile as creating a new layer of an image. So this ARG-before-FROM gotcha doesn't feel like a gotcha to me, but rather, the consequence of literally interpreting "ARG" and not knowing the side-effects of a directive in a Dockerfile. (Yes, even WORKDIR, ENTRYPOINT, and related instructions create a layer, albeit a 0-byte one)


It persists across every other new layer. It just doesn't persist across FROM.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: