-
Notifications
You must be signed in to change notification settings - Fork 846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
args in marathon file does not resolve env variables #3416
Comments
Hey @triggity the args are passed directly to the exec syscall without running a shell. This is intended behavior. If you need env expansion please use |
@aquamatthias So is it impossible to pass a command to a docker container and have an environment variable be interpreted in that command? |
@micahhausler Don't know what you mean by incompatible. Please see https://mesosphere.github.io/marathon/docs/native-docker.html, especially the Command vs Args section. |
I see what you mean now. I got confused because the |
cmd
field in a marathon app config would resolve environment variables before passing them in. this is documented here: https://mesosphere.github.io/marathon/docs/ports.htmlhowever, the
args
field does not have it's environment variables resolved before passing in.Is this a bug or deliberate and missing from the documentation?
a canonical example:
using a basic image with
and
args: [ "$PORT0"]
the container logs show it echoing
$PORT0
instead of the expected resolved env variable for $PORT0The text was updated successfully, but these errors were encountered: