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

Adding custom env values? #1

Open
teodorescuserban opened this issue Feb 9, 2015 · 2 comments
Open

Adding custom env values? #1

teodorescuserban opened this issue Feb 9, 2015 · 2 comments

Comments

@teodorescuserban
Copy link

Hello,
Thank you for your awesome idea!
It would be nice to have some variables passed on to the message (like for example docker host hostname).
This would make us avoid putting a long and descriptive name to the container itself.

@int128
Copy link
Owner

int128 commented Feb 10, 2015

Do you mean like below idea?
For example, invoke with a custom env as follows:

docker run -d -e webhook=URL -e message.DockerHost=$HOSTNAME \
 -v /var/run/docker.sock:/var/run/docker.sock int128/slack-docker

and hostname of the docker host is shown in messages.

docker/container_name
Image: ...
IP Address: ...
Path: ...
Args: ...
Started at: ...
DockerHost: docker-host.local

@teodorescuserban
Copy link
Author

Mmm. This could work too for docker hostname only
What I would prefer to do is to extract more data from the event to display or from the container suffering the respective event rather than pushing static env var into the node container.
Like for example, container name would be more important than the container hostname (which is the container id).
Assuming you are using fig, you could further extract from the container name the project, not only the container name.
Things is i have to knowledge on node.js so I was just thinking that your idea can be a bit extended to enable users of this container to display more infos without actually change the node app.

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

2 participants