rules_docker icon indicating copy to clipboard operation
rules_docker copied to clipboard

container_import doesn't work with compressed tarballs

Open pauldraper opened this issue 2 years ago • 2 comments

🐞 bug report

Affected Rule

container_import

Is this a regression?

No.

Description

Contrary to the documentation, container_import doesn't work with compressed tarballs.

🔬 Minimal Reproduction

Use a .tar.gz for container_load.

🔥 Exception or Error

Failed to load tarball into OCI format: failed to read docker image tarball from ... archive/tar: invalid tar header

🌍 Your Environment

Operating System:

Output of bazel version:

Rules_docker version:

Anything else relevant?

pauldraper avatar Mar 18 '22 16:03 pauldraper

I'm seeing the same behavior with container_load whose docs also indicate that it should work with a compressed tarball.

marczych-zoox avatar Jul 15 '22 00:07 marczych-zoox

piling on with a +1.

pjjw avatar Jul 18 '22 22:07 pjjw

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!

github-actions[bot] avatar Jan 15 '23 02:01 github-actions[bot]

This issue was automatically closed because it went 30 days without a reply since it was labeled "Can Close?"

github-actions[bot] avatar Feb 14 '23 02:02 github-actions[bot]

Can we reopen this?

marczych-zoox avatar Feb 15 '23 03:02 marczych-zoox

fwiw we worked around this by tarring the docker-generated tarball (so a tar in a tar), gzipping that, and then using http_archive to get a repository with the importable tarball.

pjjw avatar Feb 15 '23 15:02 pjjw

Yeah, we did the same thing but I was hoping for a less hacky workaround. If nothing else, the documentation is out of date.

marczych-zoox avatar Feb 16 '23 00:02 marczych-zoox