Code Monkey home page Code Monkey logo

Comments (12)

aheck avatar aheck commented on September 2, 2024

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?

from for-mac.

NiklasBr avatar NiklasBr commented on September 2, 2024

Host networking seems to be working, yes.

from for-mac.

NiklasBr avatar NiklasBr commented on September 2, 2024

@jpbriend I see you consider it fixed, but if it is fixed how do I stop the notification from consistently appearing?

from for-mac.

jpbriend avatar jpbriend commented on September 2, 2024

Hi @NiklasBr ,
here is the sequence of events which probably happens on your laptop:

  • your laptop restarts
  • Docker Desktop is configured to automatically start at startup
  • Docker Desktop starts before wifi connects because the computer is fast (faster than wifi connecting)
  • Docker Desktop can not connect and considers the user not yet signed in because entitlement can not be downloaded (no network connectivity yet).
  • Host networking checks for entitlement at startup. It is not found and disables itself. A notification is sent to the notification center.
  • Wifi finally connects.
  • Docker Desktop automatically reconnects because network connectivity is detected.
  • Host networking is re-enabled because entitlement is ✅ .

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.

from for-mac.

NiklasBr avatar NiklasBr commented on September 2, 2024
  • 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.

from for-mac.

jpbriend avatar jpbriend commented on September 2, 2024

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.

from for-mac.

NiklasBr avatar NiklasBr commented on September 2, 2024

I don't think I have ever enabled Host Networking.

Screenshot 2024-08-26 at 11 02 55

from for-mac.

jpbriend avatar jpbriend commented on September 2, 2024

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.

from for-mac.

NiklasBr avatar NiklasBr commented on September 2, 2024

Screenshot 2024-08-26 at 11 16 00

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"

from for-mac.

jpbriend avatar jpbriend commented on September 2, 2024

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.

from for-mac.

NiklasBr avatar NiklasBr commented on September 2, 2024
  "hostNetworkingEnabled": false,
  "hostNetworkingPreferEnabled": false,

from for-mac.

jpbriend avatar jpbriend commented on September 2, 2024

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:
image

from for-mac.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.