bazelbuild/rules_docker의 문서에 따르면, OSX에서 이러한 컨테이너 이미지로 작업 할 수 있어야하며, 도커가 없으면 그렇게 할 수 있다고 주장합니다.OSX에서 Bazel 컨테이너 이미지를 실행하는 방법은 무엇입니까?
These rules do not require/use Docker for pulling, building, or pushing images. This means:
They can be used to develop Docker containers on Windows/OSX without boot2docker or docker-machine installed.
They do not require root access on your workstation.
어떻게하면됩니까? 다음은 간단한 규칙이있다 :
go_image(
name = "helloworld_image",
importpath = "github.com/nictuku/helloworld",
library = ":go_default_library",
visibility = ["//visibility:public"],
)
내가 bazel build :helloworld_image
으로에게 이미지를 구축 할 수 있습니다. 이 화재 - 빈에서 타르 볼을 생산하지만, 그것을 실행되지 않습니다 : 바보이 OSX 인 리눅스를 실행하려고
INFO: Running command line: bazel-bin/helloworld_image
Loaded image ID: sha256:08d312b529d30431c68741fd3a31468a02533f27a8c2c29eedc969dae5a39852
Tagging 08d312b529d30431c68741fd3a31468a02533f27a8c2c29eedc969dae5a39852 as bazel:helloworld_image
standard_init_linux.go:185: exec user process caused "exec format error"
ERROR: Non-zero return code '1' from command: Process exited with status 1.
.
.tar
콘텐츠에서 "도커로드"를 시도했지만 형식이 마음에 들지 않습니다.
$ docker load -i bazel-bin/helloworld_image-layer.tar open /var/lib/docker/tmp/docker-import-330829602/app/json: no such file or directory
도움 말? 감사!