Closed sergeimonakhov closed 3 months ago
hi,
i use remote driver for buildx:
docker buildx create \ --name remote-kubernetes \ --driver remote \ tcp://buildkitd.default.svc:1234 \ --use
docker buildx build work perfectly:
docker buildx build
docker buildx build -t test . --push
but if use docker build:
docker build
docker build -t test . --push
i got:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
As far as I understand, this is due to docker context:
docker context
NAME DESCRIPTION DOCKER ENDPOINT ERROR default * Current DOCKER_HOST based configuration unix:///var/run/docker.sock
Run build on default buildx executor
The build is trying to run on the local daemon
github.com/docker/buildx v0.15.1 1c1dbb2e4cb5363110f42102744a08d034c2300d
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:///var/run/docker.sock. Is the docker daemon running? errors pretty printing info
NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS remote-kubernetes* remote \_ remote-kubernetes0 \_ tcp://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:///var/run/docker.sock. Is the docker daemon running?
ARG RUST_IMAGE=rust:1.77-slim-bookworm FROM $RUST_IMAGE as builder WORKDIR /usr/src/app COPY . . RUN apt-get update \ && apt-get install --no-install-recommends -y pkg-config libssl-dev RUN cargo build --release # Stage 2: Create a minimal image with just the binary FROM debian:bookworm-slim RUN apt-get update \ && apt-get install --no-install-recommends -y libssl-dev git ca-certificates \ && apt-get clean autoclean \ && apt-get autoremove --yes \ && rm -rf /var/lib/{apt,dpkg,cache,log}/ # Copy the binary from the previous stage COPY --from=builder /usr/src/app/target/release/sbc /usr/local/bin/
No response
i moved this issue to https://github.com/docker/cli/issues/5193
Contributing guidelines
I've found a bug and checked that ...
Description
hi,
i use remote driver for buildx:
docker buildx build
work perfectly:but if use
docker build
:i got:
As far as I understand, this is due to
docker context
:Expected behaviour
Run build on default buildx executor
Actual behaviour
The build is trying to run on the local daemon
Buildx version
github.com/docker/buildx v0.15.1 1c1dbb2e4cb5363110f42102744a08d034c2300d
Docker info
Builders list
Configuration
Build logs
No response
Additional info
No response