-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Usage of running clair via docker is wrongly written. #484
Conversation
|
@jzelinskie I mean that in sample configuration localhost is used to connect to postgres. But when container is running in bridge network, there is no way to access localhost. I think that the document about running clair via docker works wrong. |
Ah! It turns out that you can elide Sorry about that. |
@@ -77,7 +77,7 @@ If this error is raised, manually execute `docker-compose start clair`. | |||
$ mkdir $PWD/clair_config | |||
$ curl -L https://raw.githubusercontent.com/coreos/clair/master/config.yaml.sample -o $PWD/clair_config/config.yaml | |||
$ docker run -d -e POSTGRES_PASSWORD="" -p 5432:5432 postgres:9.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we need to add net=host for postgres too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, postgres container publishes 5432 port to host. It is shown to host as localhost at the side of clair container which is running in host network.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I'll approve this change if you can fix the spelling mistake in the commit message.
Usage of Rrunning clair via docker is wrongly written.
=> Usage of running clair via docker is wrongly written.
Thanks! It's been a long time since I've used Docker directly on Linux (I use mac) and so I've forgotten the semantics of net=host.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed my spelling mistake and changed author to me.
Command line needs --net=host.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Usage of running clair via docker is wrongly written.
Command line needs --net=host when docker is used to run clair.