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

[docs] Docker run example with privileged port #4054

Open
gesellix opened this Issue Apr 6, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@gesellix
Copy link
Contributor

gesellix commented Apr 6, 2018

What did you do?

I read the migration guide :)

What did you expect to see?

Hints about the migration from Prometheus 1.x to 2.x.

What did you see instead? Under which circumstances?

Not instead, but I stumbled about the notes about non-root users in combination with privileged ports at the end of the migration guide: https://github.com/prometheus/prometheus/blob/master/docs/migration.md#prometheus-non-root-user

The guide gives an example how to use Docker to make Prometheus available on port 80:

docker run -u root -p 80:80 prom/prometheus:v2.0.0-rc.2  --web.listen-address :80

An example like this works, too:

docker run -p 80:9090 -v `pwd`/prometheus.yml:/prometheus.yml prom/prometheus:v2.2.1 --web.external-url=http://prometheus:80 --config.file=/prometheus.yml

Please note that I also added the necessary config file via volume bind.

The example wouldn't drive users to let Prometheus run as root and it also leverages a container's port mapping possibilities - which makes the outer and inner perspective of a container more explicit.

My question is: are there any reasons for the way the current example has been documented? If not, I can submit a PR to improve the Docker example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.