RosettaCommons / binder

Binder, tool for automatic generation of Python bindings
MIT License
321 stars 66 forks source link

Persist container ARGs across multiple stages #284

Closed rgov closed 9 months ago

rgov commented 9 months ago

The behavior of ARG in multi-stage Dockerfiles is a bit unusual. They are scoped to each stage, so you have to repeat them if you want to use the same variable in multiple stages. But, if you set a default value, that default value has to be set before the first stage. Ref. StackOverflow answer.

The container does not actually build without this change, because the ${CLANG_VERSION} variable expands to the empty string in the second stage, and then it fails installing clang--dev.