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

Reports "Cannot connect to the Docker daemon at unix:///var/run/docker.sock" when use Colima as docker server #603

Closed
suerta-git opened this issue Apr 22, 2023 · 5 comments
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec kind/question Questions about existing features resolution/fixed This issue was fixed

Comments

@suerta-git
Copy link

What happened?

When use Colima as docker server, the socket location is NOT /var/run/docker.sock by default: https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#docker-socket-location

Colima uses Docker contexts to make docker client connects to correct location.

Expected Behavior

Identify the correct socket location by docker context, to be compatible with colima.

Steps to reproduce

  • Use Colima as docker server
  • pulumi up

Output of pulumi about

CLI
Version 3.63.0
Go Version go1.20.3
Go Compiler gc

Plugins
NAME VERSION
command 0.7.2
docker 4.1.2
docker 3.6.1
gcp 6.54.0
gcp 6.54.0
nodejs unknown
random 4.12.1

Host
OS darwin
Version 12.6.2
Arch x86_64

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@suerta-git suerta-git added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Apr 22, 2023
@suerta-git
Copy link
Author

suerta-git commented Apr 22, 2023

@suerta-git
Copy link
Author

And I feel that the building becomes significantly slower after I migrated @pulumi/docker from 3.x to 4.x caused by some reason :(.
Seams the layer caches are not hit correctly.

@guineveresaenger
Copy link
Contributor

Hi @suerta-git - the way to set this for the Pulumi provider would be to set your docker host in the provider config. Env vars will work as well, as you discovered already.

As for the build speed, there is currently an upstream docker client bug that fails to cache on every second build.
We are almost done with a fix for this in the provider that will make it into the next minor release.

@guineveresaenger guineveresaenger removed the needs-triage Needs attention from the triage team label Apr 24, 2023
@guineveresaenger guineveresaenger self-assigned this Apr 24, 2023
@guineveresaenger guineveresaenger added kind/question Questions about existing features resolution/fixed This issue was fixed labels Apr 25, 2023
@guineveresaenger
Copy link
Contributor

Docker v4.2.0 is currently being released. We hope this addresses your caching concerns - feel free to re-open if necessary.

I'm closing this as addressed in #601 for now. 🙇‍♀️

@suerta-git
Copy link
Author

Docker v4.2.0 is currently being released. We hope this addresses your caching concerns - feel free to re-open if necessary.

Thanks @guineveresaenger, I will have a try later.

The way to set this for the Pulumi provider would be to set your docker host in the provider config. Env vars will work as well, as you discovered already.

I suggest you guys can add this use case into troubleshooting or somewhere because the error message is confusing for a person who is not very familiar with docker context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec kind/question Questions about existing features resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

2 participants