-
Notifications
You must be signed in to change notification settings - Fork 153
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
change port for arminc/clair-db as a docker postgresql container is running on the same port #51
Comments
You can't change the port that easily because it is configured in clair here https://github.com/arminc/clair-local-scan/blob/master/clair/config.yaml. You can do two things:
|
Thanks , i will check it and let you know :) |
Hi, can you just throw some light on how to build the container after
modifiying the DB port in config.yaml in
https://github.com/arminc/clair-local-scan/tree/master/clair
…On Tue, Jul 31, 2018 at 12:02 PM Armin Coralic ***@***.***> wrote:
You can't change the port that easily because it is configured in clair
here
https://github.com/arminc/clair-local-scan/blob/master/clair/config.yaml.
You can do two things:
1. Create your own Docker container with Clair - here is the one I
provide -> https://github.com/arminc/clair-local-scan/tree/master/clair
and change the port there
2. Instead of exposing the DB port link the DB container with the
Clair container trough Docker
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AL2vFh8d9pnHu2Ewzkll8g5z9Ksw2fu4ks5uL_nngaJpZM4Vnjh9>
.
|
i have created a container using docker build, then when i try to run modified build it says dial tcp error 172.17.0.2:XXXX XXXX(is the modified port). can you just say me where was i going wrong |
This is not an issue for me but posting because I'm curious what's going on. I'm running your image by following GitLab's docs https://docs.gitlab.com/ce/ci/examples/container_scanning.html If I use
But if I clone https://github.com/arminc/clair-local-scan,
There seems to be a difference between how |
Just in case if someone is facing the same issue with podman in 2023. Here are the steps that i followed to resolve "no such host error".. Links feature of Docker is now deprecated and is no longer supported. Placing containers in a pod and networking them is an alternative to links functionality.
Clair Config.yaml uses the following connection string to interact with postgres db
Link parameter was previously used to set network aliases for a running container. Here
This functionality is no longer supported ; hence created a pod with name "postgres" and expose port 5432/6060 and associate the clair-db & clair containers.
Now, Clair API Server can successfully connect to Clair postgres DB and the following logs are recorded during start-up.
|
Hi, could you please let me know while running the command
docker run -p 5432:5432 -d --name db arminc/clair-db:2017-09-18 , i already have a postgres container for my project running on that 5432 port, if i simple change
docker run -p 5432:5432 -d --name db arminc/clair-db:2017-09-18 this port number to
docker run -p XXXX:XXXX -d --name db arminc/clair-db:2017-09-18 would the scanner work fine or does it gives any error?
The text was updated successfully, but these errors were encountered: