Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect docker client behavior when using a buildx remote driver #5193

Open
sergeimonakhov opened this issue Jun 25, 2024 · 0 comments
Open

Comments

@sergeimonakhov
Copy link

Description

hi,

i use remote driver for buildx:

docker buildx create \
  --name remote-kubernetes \
  --driver remote \
  tcp:https://buildkitd.default.svc:1234 \
  --use

docker buildx build work perfectly:

docker buildx build -t test . --push

but if use docker build:

docker build -t test . --push

i got:

ERROR: Cannot connect to the Docker daemon at unix:https:///var/run/docker.sock. Is the docker daemon running?

As far as I understand, this is due to docker context:

NAME        DESCRIPTION                               DOCKER ENDPOINT               ERROR
default *   Current DOCKER_HOST based configuration   unix:https:///var/run/docker.sock

Reproduce

docker buildx create \
  --name remote-kubernetes \
  --driver remote \
  tcp:https://buildkitd.default.svc:1234 \
  --use
docker build -t test . --push

Expected behavior

docker build must run build on default buildx executor

docker version

Client:
 Version:           26.1.4
 API version:       1.45
 Go version:        go1.21.11
 Git commit:        5650f9b
 Built:             Wed Jun  5 11:27:57 2024
 OS/Arch:           linux/amd64
 Context:           default
Cannot connect to the Docker daemon at unix:https:///var/run/docker.sock. Is the docker daemon running?

docker info

Client:
 Version:    26.1.4
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.15.1
    Path:     /usr/local/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.27.2
    Path:     /usr/local/libexec/docker/cli-plugins/docker-compose

Server:
ERROR: Cannot connect to the Docker daemon at unix:https:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info

Additional Info

docker buildx ls:

NAME/NODE                DRIVER/ENDPOINT                                         STATUS    BUILDKIT   PLATFORMS
remote-kubernetes*       remote
 \_ remote-kubernetes0    \_ tcp:https://buildkitd.default.svc:1234   running   v0.14.1    linux/amd64, linux/amd64/v2, linux/amd64/v3
default                                                                          error

Cannot load builder default: Cannot connect to the Docker daemon at unix:https:///var/run/docker.sock. Is the docker daemon running?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants