bazel和docker图像:什么&x27;@go\u image\u base//image的意义是什么?

bazel和docker图像:什么&x27;@go\u image\u base//image的意义是什么?,docker,bazel,Docker,Bazel,我有一个src/BUILD.bazel(在MacOs上): 本工程无误: bazel build //src:bazel_docker_image 显示: INFO: Analyzed target //src:bazel_docker_image (0 packages loaded, 0 targets configured). INFO: Found 1 target... Target //src:bazel_docker_image up-to-date: bazel-bin

我有一个src/BUILD.bazel(在MacOs上):

本工程无误:

bazel build //src:bazel_docker_image
显示:

INFO: Analyzed target //src:bazel_docker_image (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //src:bazel_docker_image up-to-date:
    bazel-bin/src/bazel_docker_image-layer.tar
INFO: Elapsed time: 2.361s, Critical Path: 0.03s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
但是tar文件(可以作为图像导入docker)只包含静态链接的任务。映像不能作为容器运行,因为映像不包含以下内容:

/usr/lib/libSystem.B.dylib
那么@go\u image\u base//image的意义是什么?我认为这应该是一个基本上完整的独立映像,包含所有必需的lib、有效的入口点等

如果在bazel bin/external/go_image_static/image/000.tar.gz.nogz中查看,bazel似乎有一个完整的图像,更像bazel文档所建议的输出。有什么好处

此外,Bazel文件提到:

To address this, we publish variants of the distroless runtime images
tagged :debug, which are the exact-same images, but with additions
such as busybox to make debugging easier.
但没有提供一个例子


在这一点上,我最好从阿尔卑斯山制作一个容器图像,自己做所有事情。我真的很想解决这个问题,因为Bazel通常会让docker的东西变得更简单。

这个问题正在得到回答(我希望解决)

To address this, we publish variants of the distroless runtime images
tagged :debug, which are the exact-same images, but with additions
such as busybox to make debugging easier.