-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Builds don't work if the docker socket isn't in /var/run/docker.sock
location (using lima instead of Docker Desktop)
#7078
Comments
I have the same issue. Docker context is not honored by skaffold. |
I'm also experiencing the same issue with colima. Would love to see Docker context support added 😁 |
Also facing this issue trying to use Podman in place of Docker. On Mac, using a symlink to any Podman socket doesn't work either. There is ongoing discussion in the Kubernetes Slack server, channel #skaffold related to this issue. #5739 and #5773 are both open issues that could easily provide an alternative via Minikube, but this has been deprioritized for unexplained reasons. The Minikube team appears to have done their part for this and is waiting for the Skaffold team to do the same as noted here. Hope these breadcrumbs help others seeking a solution. |
This comment was marked as outdated.
This comment was marked as outdated.
Thanks you for the issue. We would appreciate any help from the community on this issue. |
Hi, I succeeded to run Docker build when specified |
i have the same issue when using docker desktop for linux in ubuntu, as the documentation says there is another context that uses another endpoint different from |
I think I have the same issue, I'm trying to push an image to a registry. Skaffold v1.36.0 time="2022-05-31T01:01:01Z" level=warning msg="failed to list images: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?" subtask=gitlab-ci-java task=Build |
@agxs it looks like there are a couple places in our code where we're not respecting the user's use of useCLI. Would be great to comb through these and make sure we're using docker cli where appropriate when specified. I'm not sure our team has the bandwidth to look at this/fix this soon, but PRs are always welcome |
@leslieluyu would you be able to open an issue and attach logs from running with |
Similar workaround for podman users:
|
@MarlonGamez, it sounds like there's not currently a workaround for podman users not using the podman system service (and podman.sock and DOCKER_HOST) as @drewp mentioned, since there is still some code not respecting useCLI, right? E.g. I see from our skaffold build (v1.39.2) attempting to use podman:
|
The way to fix this is to set |
@gsquared94, I understand that the original issue description here was about build tools that have a docker socket but place it elsewhere, and that the DOCKER_HOST workaround applies there. But the issue description also references "useDockerCLI: true". I think @MarlonGamez 's comment earlier mentioned that the useDockerCLI setting was a little incomplete, contributing to this problem. It sounds like build tools that do not have a docker socket at all (like using podman but without the podman system service) will still not work because of this, right? I know there may not be bandwidth to complete the cleanup of useDockerCLI. But could an issue be created to track that it's incomplete? Right now it kind of seems that useDockerCLI doesn't do anything from the user's point of view, does it? Since skaffold is still going to use the Docker Engine API anyway via the required docker socket. And/or a documentation update clarifying the state of useDockerCLI? Thanks for your time! |
We are making an effort to provide a socket for use with Mostly since projects like skaffold have been so slow to adopt The tricky part with DOCKER_HOST for https://docs.docker.com/engine/security/rootless/#expose-docker-api-socket-through-ssh Thus it needs to go at the very top of the # ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
It also need a "docker" program to run For instance you can do a small shell wrapper with |
Actual behavior
It looks like running
skaffold run
fails when the docker socket isn't in the default location of/var/run/docker.sock
. Even when setting the options in theskaffold.yaml
to useuseDockerCLI: true
the build still fails.Expected behavior
That the docker socket file location is can be anywhere when the options in the skaffold.yaml file are set to use the docker cli and/or provide a way of overriding the expected socket location that skaffold uses.
Information
I'm using limactl version 0.8.2 instead of Docker Desktop, installed via Homebrew, along with the docker cli also installed via Homebrew. VM was created using the sample
docker.yaml
at https://github.com/lima-vm/lima/blob/master/examples/docker.yamlSteps to reproduce the behavior
limactl start https://raw.githubusercontent.com/lima-vm/lima/master/examples/docker.yaml
limactl
skaffold run
Normal docker commands work fine, just commands via skaffold have the issue.
I currently have a workaround where I manually create a symlink from
/var/run/docker.sock
to the socket that lima creates in$HOME/.lima/<vm>/sock/docker.sock
The text was updated successfully, but these errors were encountered: