We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crane doesn't support working with .tar.gz files, requiring that Docker container images that are gzipped are first untarred.
crane
.tar.gz
Attempting to run crane validate --tarball <filename>.tar.gz results in the error:
crane validate --tarball <filename>.tar.gz
Error: failed to read image <filename>.tar.gz: archive/tar: invalid tar header
git init
flake.nix
git add flake.nix
{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/23.11"; }; outputs = { self, nixpkgs }: let allSystems = [ "x86_64-linux" # 64-bit Intel/AMD Linux "aarch64-linux" # 64-bit ARM Linux ]; forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f { system = system; pkgs = import nixpkgs { inherit system; }; }); # Build Docker container. dockerImageTools = system: pkgs: pkgs.dockerTools.buildImage { name = "tools"; tag = "latest"; copyToRoot = [ pkgs.coreutils pkgs.bash pkgs.jq ]; config = { Cmd = [ "bash" ]; }; }; in { packages = forAllSystems ({ system, pkgs }: { docker-image-tools = dockerImageTools system pkgs; }); }; }
nix build ./#packages.x86_64-linux.docker-image-tools
result
crane validate --tarball /nix/store/8cix3l8fwpz7m5v7cggmk0467s9s7naj-docker-image-tools.tar.gz
Expected it to work without additional steps.
The text was updated successfully, but these errors were encountered:
This issue would be fixed by merging #1858
I've tested the PR and confirm it works well.
This also probably fixes #1838
Sorry, something went wrong.
@jonjohnsonjr PTAL
@imjasonh cc
No branches or pull requests
Describe the bug
crane
doesn't support working with.tar.gz
files, requiring that Docker container images that are gzipped are first untarred.Attempting to run
crane validate --tarball <filename>.tar.gz
results in the error:To Reproduce
git init
.flake.nix
file containing this content and add it withgit add flake.nix
:nix build ./#packages.x86_64-linux.docker-image-tools
which outputs aresult
file, which is a.tar.gz
file.crane validate --tarball /nix/store/8cix3l8fwpz7m5v7cggmk0467s9s7naj-docker-image-tools.tar.gz
to see the error.Expected behavior
Expected it to work without additional steps.
The text was updated successfully, but these errors were encountered: