-
Notifications
You must be signed in to change notification settings - Fork 693
do not flatten file paths in container_image #317
Comments
I find this troubling also. Is this a bug or a feature? |
Friendly ping. This is a problem for adoption of rules_docker. |
Setting
Without |
is this still an issue? please reopen if so. |
It is! I can’t reopen this issue, though |
Is the workaround you found using pkg_tar noy working or otherwise problematic? |
It’s problematic because it’s undocumented and unexpected. It’s really hard to understand why this happens or how to fix it without lots of googling. It’s another weird thing that you have to tell people about when they just want to try out Bazel (and there’s plenty of them, you know?) |
I have updated the docs (See PR updating readme) to explain this issue. I'm closing this again as I dont think the fix for this issue is on this repo (i.e., it seems to me the issue is with pkg_tar rule). Please let me know if anyone feels there is more we can do here to reopen. |
I find it very strange that an extra rule is required to place files in specific folders in a Perhaps something like this should be possible? container_image(
name = "my_image",
base = ":nodejs",
files = {
"/home/runner/index.js": "//:some_node_rule",
"/home/runner/assets/logo.png": "logo.png",
},
) where the key to the dictionary is the path inside the image and the value is a source file or rule |
This is a really huge bug imho. This means, for example, if you have a |
okay, this works |
See https://github.com/bazelbuild/bazel/issues/2176
This is still happening and has now gotten weirder: https://github.com/bazelbuild/bazel/issues/2176#issuecomment-364352176
It would be good for container_image's
files
to not just be the basename files including in the directory, but to, by default, maintain the full relative file paths.The text was updated successfully, but these errors were encountered: