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

Usage of running clair via docker is wrongly written. #484

Merged
merged 1 commit into from
Dec 20, 2017

Conversation

odg0318
Copy link
Contributor

@odg0318 odg0318 commented Nov 7, 2017

Command line needs --net=host when docker is used to run clair.

@odg0318 odg0318 closed this Dec 4, 2017
@odg0318 odg0318 reopened this Dec 4, 2017
@jzelinskie
Copy link
Contributor

net=host is an optional flag if you want to run Clair using the hosts networking namespace. It is not required for executing Clair, although I could be convinced to document this if we find users are confused about this functionality.

@jzelinskie jzelinskie closed this Dec 12, 2017
@odg0318
Copy link
Contributor Author

odg0318 commented Dec 12, 2017

@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.

@jzelinskie
Copy link
Contributor

Ah! It turns out that you can elide net=host on macOS. I'm fine with adding this in to correct the instructions for Linux users.

Sorry about that.

@jzelinskie jzelinskie reopened this Dec 12, 2017
@@ -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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@jzelinskie jzelinskie changed the title Usage of Rrunning clair via docker is wrongly written. Usage of running clair via docker is wrongly written. Dec 20, 2017
Copy link
Contributor

@jzelinskie jzelinskie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jzelinskie jzelinskie merged commit 30bd568 into quay:master Dec 20, 2017
KeyboardNerd pushed a commit to KeyboardNerd/clair that referenced this pull request Feb 2, 2018
Usage of running clair via docker is wrongly written.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants