-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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
Error connecting to Docker daemon on macOS with Docker Desktop 4.13 #32897
Comments
On Linux, Spring Boot tries to talk to the Docker daemon using a socket at
The "docker-desktop CLI context" refers to the context that can be seen with It might be nice for the Spring Boot plugins to inspect I think we'll need to default to |
That sounds good to me. |
They're going to roll the change back to give folks more time to adapt: docker/for-mac#6529 (comment) |
Marking this as blocked for now. There are work-arounds available, and once Docker can |
@philwebb Is there any workaround for this? This is blocking all of our development on MacOS/IntelliJ and Docker Desktop 4.14.0 (91374). I just noticed a new build and am installing it now, but as of 4.14.0 (91374) not only is $HOME/.docker/run/docker.sock not getting created any longer, but neither is /var/run/docker.sock. |
@philwebb Looks like the latest build fixes it, now unix:///Users/USER/.docker/run/docker.sock is getting created again, but a new issue has shown up. Looks like -f was removed from the docker command so now IntelliJ doesn't work anymore. Nice. It gets the error "unknown shorthand flag: 'f' in -f" changing IntelliJ not to use Compose V2 works, but not ideal. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Docker Desktop is now the default install on Linux as well as Mac. See https://docs.docker.com/desktop/install/linux-install The differences in socket location and context now cause problems for users of Linux (and probably Windows) as well. Given that most users will be moving to Docker Desktop installations and probably using that UI for development, perhaps it would be a good idea to make an effort to improve build-image usability with Docker Desktop out of the box, without workarounds. |
I had to enable the daemon on docker desktop see Also
|
@morrica What's the problem you're having with Docker Desktop on Linux? Is Docker Desktop creating a socket in a location other than |
There are three issues I have run into attempting to use build-image with Docker Desktop. 1: I initially received a "permission denied" error when running 2. At this point the build image was nowhere to be found. It took some searching to figure out that the UI and docker command were both using a context that pointed to
This was solved by adding the correct host to my project's pom.xml:
3. Finally there is an issue running an image created by build-image from the Docker Desktop UI. Clearly only issue 2 above relates directly to this ticket, but I provide them all here so that you have a full picture of the first run experience for a new user. Hopefully changes can be made that will return build-image to a "just works" status with Docker Desktop. Thank you @scottfrederick for looking into it :-) |
Thanks for the detail @morrica.
That is correct. This is made even worse by the fact that running Docker Engine and Docker Desktop together is a supported configuration which causes confusion when Spring Boot uses the To address this I think we'll have to make the changes I suggested above. Our concern with this approach has been that the Docker |
@scottfrederick Perhaps calling the |
When installing Docker Desktop on macOS, there is a setting to create both Regarding defaulting Spring Boot to |
I've created #36445 to start using the Docker CLI context to determine the daemon host address to use. We'll leave this issue open in case we need to address the |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Given that Docker have restored the old behavior we'll close this one for now. If they break things again in the future we can reopen it. |
When using Docker Desktop 4.13, the Maven
spring-boot:build-image
goal and GradlebootBuildImage
task might fail with an error message like this:via @trisberg and @danvega
The text was updated successfully, but these errors were encountered: