Docker Desktop in Ubuntu not showing containers those are build with sudo privilege

Hi Team,

    I am using the docker desktop in Ubuntu 20.04 LTS Focal. I am just creating the macvlan network and Running container with that network.  

when I Execute the following commands without sudo privilege
Docker container IP Address is configured but IP Address is not pinging and the containers are showing in the docker desktop.

when I Execute the following commands with sudo privilege
Docker container IP Address is configured and IP Address also pinging , but the containers are not showing in the docker desktop.

 docker network create -d macvlan --subnet 192.168.60.0/24 --gateway 192.168.60.254  -o parent=eth0  custommacvlan
docker run -d --name dockermacvlan --network custommacvlan --ip 192.168.60.20 nginx

This is my problem and I am stuck with this issue for long time. kindly give me the solution as soon as possible.

Docker Desktop runs the docker engine always in a vm, regardless whether its on Linux, MacOS or Windows. As such the vm will use an IP, which does not belong to your host’s network.

I am not sure how much sense it makes to run a macvlan network with Docker Desktop.

Can you do a docker context ls and sudo docker context ls to make sure that both users actualy use the same context.

Now I find out, that sudo command is not a problem. Context is the problem.

When I set the default context

Now IP address is pinging but containers and images are not showing in the Docker desktop.

When I set the desktop-linux context

Now IP address is not pinging but containers and images are showing in the Docker desktop.

docker network create -d macvlan --subnet 192.168.60.0/24 --gateway 192.168.60.254  -o parent=eth0  custommacvlan
docker run -d --name dockermacvlan --network custommacvlan --ip 192.168.60.20 nginx

I need to show the containers and images in Docker desktop with Container IP address pinging .

This is my problem , kindly give me the solution as soon as possible.

I understand you didn’t like my last answer. Though, there is nothing to add to what I already wrote…
As to my knowledge, only docker ce is able to “integrate” macvlan networks into your local lan, as the docker engine runs on a host that is already part of your local lan. This is not the case with Docker Desktop.

I am using the free version of Docker Desktop . Shall I need to upgrade the paid version of Docker Desktop ?

When I am using the desktop-linux context , images and containers are showing in Docker desktop but macvlan network not working

docker context use desktop-linux

When I am using the default context , images and containers are not showing in Docker Desktop but macvlan network working perfectly

docker context use default

I want to make both macvlan working and images & containers need to show in the docker desktop.

Kindly give me the solution as soon as possible.