rules_docker
rules_docker copied to clipboard
`container_pull`
🚀 feature request
Relevant Rules
container_pull
Description
Add an attribute to allow for the naming of the image that is pulled. container_pull
generates out a container_import
target which defaults to the name "image". When this is imported into docker it results in an image which has the path bazel:image
.
This is not descriptive and when you list images on your machine it's very hard to tell which :image
is what.
Describe the solution you'd like
It'd be great if instead we could actually have the repository set to the name from container_pull
and the tag reused. It would make it much more clear what the imported image is.
Describe alternatives you've considered
Have you considered any alternative solutions or workarounds?
We ran into this too. We worked around this with:
third_party/io_docker_index_library_postgres/BUILD.bazel
load("@io_bazel_rules_docker//container:container.bzl", "container_image")
# A weird hack which gives the image a unique tag.
container_image(
name = "image",
base = "@io_docker_index_library_postgres//image",
visibility = ["//visibility:public"],
)
This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_docker!
This issue was automatically closed because it went 30 days without a reply since it was labeled "Can Close?"