Skip to content
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

Host address and port available inside container #119

Open
udalrich opened this issue Jun 21, 2018 · 0 comments
Open

Host address and port available inside container #119

udalrich opened this issue Jun 21, 2018 · 0 comments

Comments

@udalrich
Copy link

I have a container which needs to know its external address and port, so that it can publish that to another container that calls back to the first container. (Yes, complicated. I didn't write it.) It seemed that I might be able to do

<env>
    <KAFKA_ADVERTISED_HOST_NAME>${docker.containers.kafka.ports.9092/tcp.host}</KAFKA_ADVERTISED_HOST_NAME>
    <KAFKA_ADVERTISED_PORT>${docker.containers.kafka.ports.9092/tcp.port}</KAFKA_ADVERTISED_PORT>
</env>

However, those environment variables end up having a value of null inside the container, so I am guessing that the properties are not set by the time the are evaluated. Is there a way to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant