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

unix:///var/run/docker.sock isn't found #1140

Closed
mieubrisse opened this issue Aug 21, 2023 · 5 comments · Fixed by #1362
Closed

unix:///var/run/docker.sock isn't found #1140

mieubrisse opened this issue Aug 21, 2023 · 5 comments · Fixed by #1362
Labels
bug Something isn't working critical Critical bug or feature

Comments

@mieubrisse
Copy link
Collaborator

mieubrisse commented Aug 21, 2023

What's your CLI version?

0.81.9

Description & steps to reproduce

On some user machines (unknown what exactly causes this), there's no symlink at /var/run/docker.sock, pointing to the actual socket in the user's home directory (~/.docker/run/docker.sock). I'm not sure what causes this, and I've only seen it twice so far, but it MIGHT be related to installing Docker without sudo.

The bad news is, this is a confusing and hard blocker for users (especially those unfamiliar with Docker). This would have been a blocker for a user onboarding I was doing if I didn't know what the problem was (letting me guide the user to creating the symlink).

Desired behavior

Regardless of whether /var/run/docker.sock exists, Kurtosis Just Works

What is the severity of this bug?

Critical; I am blocked and Kurtosis is unusable for me because of this bug.

@mieubrisse mieubrisse added the bug Something isn't working label Aug 21, 2023
@github-actions github-actions bot added the critical Critical bug or feature label Aug 21, 2023
@marioevz
Copy link

I found a similar issue running in our hive server:
We have several user-dedicated docker.sock for multiple instances of the docker daemon running on the same host.
Each user has it defined as:

DOCKER_HOST=unix:///var/run/docker-marioevz.sock

It would be nice if this environment variable would be taken into account when running Kurtosis.

@mieubrisse
Copy link
Collaborator Author

Thanks @marioevz ! Sounds like #1072 would is very related to your issue

@mieubrisse
Copy link
Collaborator Author

@galenmarchetti hit this again yesterday after restart

@mieubrisse
Copy link
Collaborator Author

Seeing this again with a user. I'm starting to suspect that when Docker isn't installed via sudo mode, this is what happens

@mieubrisse
Copy link
Collaborator Author

mieubrisse commented Sep 19, 2023

We have a workaround: checking this value in the Docker engine config. However.... I don't want to call this a solution, because really Kurtosis should just handle both cases (whether /var/run/docker.sock is present or not)

Screenshot_2023-09-19_at_16 52 22

gbouv pushed a commit that referenced this issue Sep 22, 2023
## Description:
Kurtosis tries to manually locate the docker daemon socket before
falling back to docker default behavior. In descending order of
preference, it will:
1. Use the manually set environment variable `DOCKER_HOST` (if not
empty)
2. Use the system wide docker socket `/var/run/docker.sock` if it exists
3. Use the user docker socket `${HOME}/.docker/run/docker.sock` if it
exists
4. Fallback to `docker.FromEnv` which was what we were doing before

Fixes #1140 

## Is this change user facing?
YES
<!-- If yes, please add the "user facing" label to the PR -->
<!-- If yes, don't forget to include docs changes where relevant -->

## References (if applicable):
<!-- Add relevant Github Issues, Discord threads, or other helpful
information. -->
github-merge-queue bot pushed a commit that referenced this issue Oct 13, 2023
## Description:
This PR adds a small note in the Kurtosis installation docs about a
common bug that we've come across where `unix:///var/run/docker.sock`
wasn't found.

## Is this change user facing?
YES

## References (if applicable):
#1140, #1072, and #1469
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working critical Critical bug or feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants