You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found a bug that the documentation does not mention anything about my problem
I have found a bug that there are no open or closed issues that are related to my problem
I have provided version/information about my environment and done my best to provide a reproducer
Description of bug
Bug description
When running BuildKit with a custom builder, it is not possible to connect to localhost using IPv6 (connections time out).
Reproduction
Create a new builder:
docker buildx create --use --name kk
Create a new build (using docker buildx build). Run the following command as part of the build (or in a terminal inside the build container with Docker Desktop):
nc -v -w 5 localhost 14356
The result is:
nc: localhost ([::1]:14356): Operation timed out
However, in a normal Docker container, or when not using a custom builder the result is instead:
nc: connect to localhost port 14356 (tcp) failed: Connection refused
The same behavior can be tested with other network commands. For example, it is not possible to ping localhost IPv6 address.
The problem was detected when trying to compile Golang and run its tests, as one test tries to connect to a non-existing localhost port, and it fails with timeout instead of failing immediately, thus failing the test suite.
Note: I am using the Docker engine in Docker Desktop. I am not sure if that is relevant.
Version information
> docker buildx version
github.com/docker/buildx v0.19.2-desktop.1 412cbb151f1be3f8a94dc4eb03cd1b67f261dec5
> docker buildx inspect
Name: kk
Driver: docker-container
Last Activity: 2025-03-04 17:53:18 +0000 UTC
Nodes:
Name: kk0
Endpoint: desktop-linux
Status: inactive
BuildKit daemon flags: --allow-insecure-entitlement=network.host
> docker version
Client: Docker Engine - Community
Version: 27.5.1
API version: 1.47
Go version: go1.22.11
Git commit: 9f9e405
Built: Wed Jan 22 13:41:31 2025
OS/Arch: linux/amd64
Context: desktop-linux
Server: Docker Desktop 4.37.1 (178610)
Engine:
Version: 27.4.0
API version: 1.47 (minimum version 1.24)
Go version: go1.22.10
Git commit: 92a8393
Built: Sat Dec 7 10:38:57 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.7.21
GitCommit: 472731909fa34bd7bc9c087e4c27943f9835f111
runc:
Version: 1.1.13
GitCommit: v1.1.13-0-g58aa920
docker-init:
Version: 0.19.0
GitCommit: de40ad0
> docker info
Client: Docker Engine - Community
Version: 27.5.1
Context: desktop-linux
Debug Mode: false
Plugins:
ai: Ask Gordon - Docker Agent (Docker Inc.)
Version: v0.5.1
Path: /usr/lib/docker/cli-plugins/docker-ai
buildx: Docker Buildx (Docker Inc.)
Version: v0.19.2-desktop.1
Path: /usr/lib/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.31.0-desktop.2
Path: /usr/lib/docker/cli-plugins/docker-compose
debug: Get a shell into any image or container (Docker Inc.)
Version: 0.0.37
Path: /usr/lib/docker/cli-plugins/docker-debug
desktop: Docker Desktop commands (Beta) (Docker Inc.)
Version: v0.1.0
Path: /usr/lib/docker/cli-plugins/docker-desktop
dev: Docker Dev Environments (Docker Inc.)
Version: v0.1.2
Path: /usr/lib/docker/cli-plugins/docker-dev
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.27
Path: /usr/lib/docker/cli-plugins/docker-extension
feedback: Provide feedback, right in your terminal! (Docker Inc.)
Version: v1.0.5
Path: /usr/lib/docker/cli-plugins/docker-feedback
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v1.4.0
Path: /usr/lib/docker/cli-plugins/docker-init
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
Version: 0.6.0
Path: /usr/lib/docker/cli-plugins/docker-sbom
scout: Docker Scout (Docker Inc.)
Version: v1.15.1
Path: /usr/lib/docker/cli-plugins/docker-scout
Server:
Containers: 20
Running: 2
Paused: 0
Stopped: 18
Images: 3
Server Version: 27.4.0
Storage Driver: overlayfs
driver-type: io.containerd.snapshotter.v1
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
CDI spec directories:
/etc/cdi
/var/run/cdi
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 472731909fa34bd7bc9c087e4c27943f9835f111
runc version: v1.1.13-0-g58aa920
init version: de40ad0
Security Options:
seccomp
Profile: unconfined
cgroupns
Kernel Version: 6.10.14-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 7.519GiB
Name: docker-desktop
ID: 0c9854ee-a6d4-4cf8-b65d-72c9aaadcb0b
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Labels:
com.docker.desktop.address=unix:///home/user/.docker/desktop/docker-cli.sock
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5555
127.0.0.0/8
Live Restore Enabled: false
WARNING: daemon is not using the default seccomp profile
The text was updated successfully, but these errors were encountered:
Contributing guidelines and issue reporting guide
Well-formed report checklist
Description of bug
Bug description
When running BuildKit with a custom builder, it is not possible to connect to localhost using IPv6 (connections time out).
Reproduction
Create a new builder:
Create a new build (using
docker buildx build
). Run the following command as part of the build (or in a terminal inside the build container with Docker Desktop):The result is:
However, in a normal Docker container, or when not using a custom builder the result is instead:
The same behavior can be tested with other network commands. For example, it is not possible to ping localhost IPv6 address.
The problem was detected when trying to compile Golang and run its tests, as one test tries to connect to a non-existing localhost port, and it fails with timeout instead of failing immediately, thus failing the test suite.
Note: I am using the Docker engine in Docker Desktop. I am not sure if that is relevant.
Version information
The text was updated successfully, but these errors were encountered: