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

Bake --load not working in certain context #2725

Open
3 tasks done
devinrsmith opened this issue Oct 8, 2024 · 0 comments
Open
3 tasks done

Bake --load not working in certain context #2725

devinrsmith opened this issue Oct 8, 2024 · 0 comments

Comments

@devinrsmith
Copy link

Contributing guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

I just noticed that for one of my bake files, --load was not working. Manually using "--set=*.output=type=docker" instead seemed to work. The image does have a tag specified, and the following set of commands illustrates what I see.

$ docker buildx bake -f server-slim-base.hcl --print       
[+] Building 0.0s (1/1) FINISHED                                                                                                                                                                                     
 => [internal] load local bake definitions                                                                                                                                                                      0.0s
 => => reading server-slim-base.hcl 1.74kB / 1.74kB                                                                                                                                                             0.0s
{
  "group": {
    "default": {
      "targets": [
        "server-slim-base"
      ]
    }
  },
  "target": {
    "server-slim-base": {
      "context": "contexts/server-slim-base",
      "dockerfile": "Dockerfile",
      "args": {
        "GRPC_HEALTH_PROBE_VERSION": "0.4.28",
        "OPENJDK_VERSION": "21",
        "UBUNTU_VERSION": "24.04"
      },
      "tags": [
        "deephaven/server-slim-base:latest"
      ]
    }
  }
}

$ docker buildx bake -f server-slim-base.hcl --load 
[+] Building 2.7s (16/16) FINISHED                                                                                                                                              docker-container:interesting_wescoff
 => [internal] load local bake definitions                                                                                                                                                                      0.0s
 ...
 => CACHED [openjdk-bits 1/1] COPY --link --from=openjdk /opt/java/openjdk /opt/java/openjdk                                                                                                                    0.0s
WARNING: No output specified for server-slim-base target(s) with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load

$ docker buildx bake -f server-slim-base.hcl "--set=*.output=type=docker"
[+] Building 2.0s (18/18) FINISHED                                                                                                                                              docker-container:interesting_wescoff
 => [internal] load local bake definitions                                                                                                                                                                      0.0s
 ...
 => CACHED [openjdk-bits 1/1] COPY --link --from=openjdk /opt/java/openjdk /opt/java/openjdk                                                                                                                    0.0s
 => exporting to docker image format                                                                                                                                                                            0.4s
 => => exporting layers                                                                                                                                                                                         0.0s
 => => exporting manifest sha256:9b1248f49e831bbb26316db691faeca6edd751b41c42a564a93263484808e1d2                                                                                                               0.0s
 => => exporting config sha256:c4b55cab22e6259841126a48fe19f9c27021251a4341aeae02f2153babc909a5                                                                                                                 0.0s
 => => sending tarball                                                                                                                                                                                          0.4s
 => importing to docker                                                                                                                                                                                         0.0s

Other bake files I have seem to work with --load, so I'm not sure if it's something specific to this file, or some sort of bug in the command.

Expected behaviour

 => exporting to docker image format                                                                                                                                                                            0.4s
 => => exporting layers                                                                                                                                                                                         0.0s
 => => exporting manifest sha256:9b1248f49e831bbb26316db691faeca6edd751b41c42a564a93263484808e1d2                                                                                                               0.0s
 => => exporting config sha256:c4b55cab22e6259841126a48fe19f9c27021251a4341aeae02f2153babc909a5                                                                                                                 0.0s
 => => sending tarball                                                                                                                                                                                          0.4s
 => importing to docker  

Actual behaviour

WARNING: No output specified for server-slim-base target(s) with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load

Buildx version

github.com/docker/buildx v0.17.1 257815a

Docker info

Client: Docker Engine - Community
Version: 27.3.1
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.17.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.29.7
Path: /usr/libexec/docker/cli-plugins/docker-compose

Server:
Containers: 14
Running: 3
Paused: 0
Stopped: 11
Images: 1612
Server Version: 27.3.1
Storage Driver: btrfs
Btrfs:
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c
runc version: v1.1.14-0-g2c9f560
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.10.12-200.fc40.x86_64
Operating System: Fedora Linux 40 (Workstation Edition)
OSType: linux
Architecture: x86_64
CPUs: 24
Total Memory: 125.7GiB
Name: felian
ID: GWSW:TIWK:EZ6O:SF4U:ASSR:YG4E:YV6X:I5XQ:ZV4K:SC54:LARV:YMZZ
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

Builders list

NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
interesting_wescoff* docker-container
_ interesting_wescoff0 _ unix:///var/run/docker.sock running v0.13.1 linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/arm64, linux/riscv64, linux/ppc64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/loong64, linux/arm/v7, linux/arm/v6
default docker
_ default _ default running v0.16.0 linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/arm64, linux/riscv64, linux/ppc64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/loong64, linux/arm/v7, linux/arm/v6

Configuration

The repository is https://github.com/deephaven/deephaven-server-docker, and I'm able to reproduce using docker buildx bake -f server-slim-base.hcl --load.

Build logs

No response

Additional info

No response

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