-
Notifications
You must be signed in to change notification settings - Fork 192
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
DOCKER_HOST not taken into account #525
Labels
kind/bug
Something isn't working
Comments
Hello @socotra69 Sorry for the delay in returning and we really appreciate the feedback. If the impact on the tool is low, it is a very valid exchange, otherwise we will have to assess how we can make the appropriate change without impacting user interaction. |
matheusalcantarazup
added a commit
that referenced
this issue
Nov 9, 2021
Previously when an user use a different DOCKER_HOST we was not able to connect because we was not reading the environment variables. This commit change the docker client initialization to read configuration from environment variables if they exists. Fixes #525 Signed-off-by: Matheus Alcantara <matheus.alcantara@zup.com.br>
matheusalcantarazup
added a commit
that referenced
this issue
Nov 9, 2021
Previously when an user use a different DOCKER_HOST we was not able to connect because we was not reading the environment variables. This commit change the docker client initialization to read configuration from environment variables if they exists. Fixes #525 Signed-off-by: Matheus Alcantara <matheus.alcantara@zup.com.br>
matheusalcantarazup
added a commit
that referenced
this issue
Nov 9, 2021
Previously when an user use a different DOCKER_HOST we was not able to connect because we was not reading the environment variables. This commit change the docker client initialization to read configuration from environment variables if they exists. Fixes #525 Signed-off-by: Matheus Alcantara <matheus.alcantara@zup.com.br>
matheusalcantarazup
added a commit
that referenced
this issue
Nov 9, 2021
Previously when an user use a different DOCKER_HOST we was not able to connect because we was not reading the environment variables. This commit change the docker client initialization to read configuration from environment variables if they exists. Fixes #525 Signed-off-by: Matheus Alcantara <matheus.alcantara@zup.com.br>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened:
In other word, the DOCKER_HOST env var is not used by the program.
What you expected to happen:
DOCKER_HOST env var should be the law.
How to reproduce it (as minimally and precisely as possible):
Create a docker service and expose it from another host.
Set the DOCKER_HOST var on the machine.
Validate conf with a simple docker run busybox.
Start horusec
Anything else we need to know?:
It is related to the docker client creation.
horusec/internal/services/docker/client/docker_config.go
Line 25 in 02a5f25
it should be :
dockerClient, err := docker.NewClientWithOpts(docker.FromEnv)
Environment:
horusec version
): latestThe text was updated successfully, but these errors were encountered: