4 ms·
ARG not being availabe in ENTRYPOINT or CMD is so annoying for usability.
by brainzap 2y ago
ARG not being availabe in ENTRYPOINT or CMD is so annoying for usability.
- bheadmaster 2y agoYou can use ENV to convert ARG into an environment variable which can be used in CMD through shell environment variable evaluation: FROM ubuntu:20.04 ARG foo ENV foo $foo CMD ["/bin/sh", "-c", "echo $foo"]