As mentioned here, the full docker image tarball is created as an implicit output on demand.
But, what does it mean by on demand? how can I inform the build to produce it?
Seems a lack of documentation here.
You can specify the "image.tar" target name explicitly to build it; for instance, if your container_image
target is named my_image
in //foo
, this will produce the tar archive in bazel-out:
bazel run //foo:my_image.tar