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

Exposing host's hostname and image id #456

Closed
kaihendry opened this Issue Jul 20, 2016 · 4 comments

Comments

Projects
None yet
4 participants
@kaihendry

kaihendry commented Jul 20, 2016

Maybe I'm missing something, but I find it useful to know which image (image id) I am running from the Web application itself.

Similarly I would like to know what EC2 instance it's running upon, just to get a better idea what the load balancer is doing.

I don't quite understand how to expose those environment variables. I'm thinking the agent should just do it. Or should I look elsewhere?

https://count.dabase.com/ is my env test running on ECS in Singapore.

@juanrhenals

This comment has been minimized.

Show comment
Hide comment
@juanrhenals

juanrhenals Jul 28, 2016

Contributor

Hello @kaihendry,

Maybe I'm missing something, but I find it useful to know which image (image id) I am running from the Web application itself.

Can you explain a little bit more about your use case and what you would be using the image id for?

Similarly I would like to know what EC2 instance it's running upon, just to get a better idea what the load balancer is doing.

In regards to the EC2 instance-id, this is not exposed as an environment variable within the host (or container for that matter), it is exposed though the Instance Metadata Service. This can be accessed from any container on the host; you can read more about the available Instance Metadata Categories here.

I don't quite understand how to expose those environment variables. I'm thinking the agent should just do it. Or should I look elsewhere?

Currently, we do not support setting these values into environment variables. That said, you are free to set them manually using the values from the Instance Metadata Service.

Contributor

juanrhenals commented Jul 28, 2016

Hello @kaihendry,

Maybe I'm missing something, but I find it useful to know which image (image id) I am running from the Web application itself.

Can you explain a little bit more about your use case and what you would be using the image id for?

Similarly I would like to know what EC2 instance it's running upon, just to get a better idea what the load balancer is doing.

In regards to the EC2 instance-id, this is not exposed as an environment variable within the host (or container for that matter), it is exposed though the Instance Metadata Service. This can be accessed from any container on the host; you can read more about the available Instance Metadata Categories here.

I don't quite understand how to expose those environment variables. I'm thinking the agent should just do it. Or should I look elsewhere?

Currently, we do not support setting these values into environment variables. That said, you are free to set them manually using the values from the Instance Metadata Service.

@kaihendry

This comment has been minimized.

Show comment
Hide comment
@kaihendry

kaihendry Aug 2, 2016

Knowing the image id or digest rather will help us know exactly what container the Instance is running. This is helpful to know from the Website whilst doing deployments for example.

kaihendry commented Aug 2, 2016

Knowing the image id or digest rather will help us know exactly what container the Instance is running. This is helpful to know from the Website whilst doing deployments for example.

@kiranmeduri

This comment has been minimized.

Show comment
Hide comment
@kiranmeduri

kiranmeduri Aug 12, 2016

Contributor

IIUC in general there is a use-case for exposing some of the static details from docker inspect to the container. I would record this as a feature request which we do not support today. Whether it is environment variable or some other access mechanism is yet to be decided. Thanks for bringing this up.

Contributor

kiranmeduri commented Aug 12, 2016

IIUC in general there is a use-case for exposing some of the static details from docker inspect to the container. I would record this as a feature request which we do not support today. Whether it is environment variable or some other access mechanism is yet to be decided. Thanks for bringing this up.

@aaithal

This comment has been minimized.

Show comment
Hide comment
@aaithal

aaithal Apr 14, 2017

Member

@kaihendry I'm closing this as it's now being tracked in #710. We will update that issue as we have more updates. Please feel free to update that issue if you have more comments. Thanks!

Member

aaithal commented Apr 14, 2017

@kaihendry I'm closing this as it's now being tracked in #710. We will update that issue as we have more updates. Please feel free to update that issue if you have more comments. Thanks!

@aaithal aaithal closed this Apr 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment