Docker Swarm Setup with docker desktop - buildx ls hangs with "context deadline exceeded"
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 682
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 29
Description
Hello, I have a raspberry pi 4 (64 bit) and a windows10 computer with WSL2 backend, the main objective is to build multiplatform docker images with linux/arm64 and linux/amd64.
Setup
Docker installation
- Both pi and windows 10 are running docker 20.10.7 with the docker desktop version 3.5.2 running on Win10
- I've installed buildx as per the instructions in the readme on the pi.
Firewall updates
- I've updated the win10 firewall to open ports
2375-2377, 4789, 7946on both incoming and outgoing connections for TCP and4789, 7946for incoming and outgoing connections for UDP. - On the raspberry pi I've made edits to
daemon.jsonandoverride.confas suggested here - I am unsure what needs to be edited (if any) need to be made on the Win10 Desktop.
Setting up the swarm
On the raspberry Pi I then ran docker swarm init and copied the token and ran docker swarm join on the Win10 Desktop.
Both commands finished successfully.
Running
pi $ docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
u8gar3ofjb8qvgt6as8sgnv4b docker-desktop Ready Active 20.10.7
kh4azzq57ggwfhympe2l82d61 * raspberrypi Ready Active Leader 20.10.7
We see that the swarm connection completed successfully.
Noticing that docker-desktop isn't an appropriate hostname, I update /etc/hosts to point 'docker-desktop` to the local ip address of the windows computer.
To test this is successful
pi $ ping docker-desktop
PING docker-desktop (192.168.0.17) 56(84) bytes of data.
64 bytes from docker-desktop (192.168.0.17): icmp_seq=1 ttl=128 time=1.24 ms
I then initiate my buildx instance:
pi $ docker buildx create --use --name multibuild raspberrypi
multibuild
pi $ docker buildx ls
NAME/NODE DRIVER/ENDPOINT STATUS PLATFORMS
multibuild * docker-container
multibuild0 tcp://raspberrypi:2375 inactive
default docker
default default running linux/arm64, linux/arm/v7, linux/arm/v6
I then try to add the 'docker-desktop' node to my multibuild for linux/amd64 platforms.
pi $ docker buildx create --append --name multibuild docker-desktop
multibuild
But now docker buildx ls hangs, upon cancelling I get the following:
pi $ docker buildx ls
NAME/NODE DRIVER/ENDPOINT STATUS PLATFORMS
multibuild * docker-container
multibuild0 tcp://raspberrypi:2375 Get "http://raspberrypi:2375/v1.41/containers/buildx_buildkit_multibuild0/json": context deadline exceeded
multibuild1 tcp://docker-desktop:2375 Get "http://docker-desktop:2375/v1.24/containers/buildx_buildkit_multibuild1/json": context deadline exceeded
default docker
default default running linux/arm64, linux/arm/v7, linux/arm/v6
I would appreciate any help to fix this
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is named. Start by reproducing the docker buildx create --append and docker buildx ls sequence with the Raspberry Pi and Docker Desktop endpoints, then inspect the daemon and Buildx connectivity configuration described in daemon.json and override.conf. Done means establishing the cause of the timeout and documenting a verified configuration or limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, raspberry-pi
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100