Open NiklasBr opened 2 months ago
Does the feature work anyway?
When you start a container with docker run -it --net=host --rm nicolaka/netshoot nc -lkv 0.0.0.0 8000
in one terminal and try to connect to it in another terminal with nc 127.0.0.1 8000
do you get a "connection refused" error or can you enter text that then appears in the other terminal?
Host networking seems to be working, yes.
@jpbriend I see you consider it fixed, but if it is fixed how do I stop the notification from consistently appearing?
Hi @NiklasBr , here is the sequence of events which probably happens on your laptop:
Notifications can not currently be disabled (they are kind of fire-and-forget). We are working on a fix to improve this kind of race condition.
You can safely ignore the notification.
- your laptop restarts
- Docker Desktop starts before wifi connects because the computer is fast (faster than wifi connecting)
- Wifi finally connects.
I use a desktop computer, connected with Ethernet.
- Docker Desktop is configured to automatically start at startup
It is configured to not start at computer startup/login.
- Docker Desktop can not connect and considers the user not yet signed in because entitlement can not be downloaded (no network connectivity yet).
- Docker Desktop automatically reconnects because network connectivity is detected.
- Host networking is re-enabled because entitlement is ✅ .
- Host networking checks for entitlement at startup. It is not found and disables itself. A notification is sent to the notification center.
I assumed Docker Desktop should wait until it is actually ready to check for things like that rather than being so eager in throwing an incorrect error, I have now turned off "Access experimental features" so why does it still happen?
All these incorrect(?) notifications such as this one, the "something changed your configuration" (which cannot be fixed), the "log in again" (which I am according to the CLI) are really annoying. It's a pattern, and I hope they are not an indication of some deeper issue with the Docker codebase.
Can you share with us what you see in the Experimental Feature
screen?
Can you also confirm you previously enabled Host Networking option once?
Notification system revamp is in our backlog, we are aware it's not ideal (even from our point of view as DD developers).
I would also be interested in your notification regarding SignIn. Would you mind creating another issue and tagging me in it? I will have a deeper look and see if the issue is solved with the incoming changes in the CLI.
I don't think I have ever enabled Host Networking.
Oh my bad, it is in Beta Features
now (the first tab).
I see you may soon run out of disk space in the VM. Maybe run some docker prune
commands to do some cleanup.
The Docker build cache can take a lot of space and be annoying.
I'm running these regularly:
docker image prune -a -f --filter "until=240h"
docker container prune -f --filter "until=24h"
docker volume prune -f --filter "label!=keep"
Thank you that is useful.
Can you give us the content of the settings file for HostNetworking?
You can get it with this commandline: cat ~/Library/Group\ Containers/group.com.docker/settings.json | grep -i hostnetworking
If hostNetworkingPreferEnabled
is set to true
, then shutdown Docker Desktop, edit the file and set the value to false
.
After that, restart Docker Desktop. Your issue with the notification should be gone.
We'll issue the bug with this flag if you can confirm us it was set to true
in your local file.
"hostNetworkingEnabled": false,
"hostNetworkingPreferEnabled": false,
Is this notification bug happening every time you restart Docker Desktop?
Can you check that the notification is always a new one?
Notifications will persist across restarts and a timestamp indication is displayed at the bottom of the notification. It indicates Just now
when the notification was triggered less than a few minutes ago.
Docker Desktop does not remove notifications until you click on the "trash" icon displayed when the mouse hovers the notification:
Description
Got this notification even though I am logged in to my team account, also the "View More" link is useless.
Reproduce
Open Docker Desktop after a reboot.
Expected behavior
No such error message.
docker version
docker info
Diagnostics ID
39263439-8ED3-425A-A6C1-A4B1DD929F05/20240819092053
Additional Info
No response