Skip to content
New issue

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

compression=zstd not working starting from v1.16 #3147

Open
routehero opened this issue May 3, 2024 · 0 comments
Open

compression=zstd not working starting from v1.16 #3147

routehero opened this issue May 3, 2024 · 0 comments

Comments

@routehero
Copy link

routehero commented May 3, 2024

Actual behavior
gcr.io/kaniko-project/executor:v1.15.0-debug is able to produce layers compressed with zstd

gcr.io/kaniko-project/executor:v1.22.0-debug throws an error:

error building image: error building stage: failed to save snapshot to image: gzip: invalid compression level: 20

This error doesn't make sense if kaniko were using zstd. Removing --compression-level=20 from the args allows kaniko to succeed, but the layers are compressed with gzip.

Expected behavior
When using --compression=zstd, the layers produced should be compressed with zstd.

To Reproduce
Steps to reproduce the behavior:

  1. starting from v1.16.0 up to and including v1.22.0, use args: --compression=zstd --compression-level=20 --single-snapshot
  2. remove --compression-level=20, then run docker manifest inspect on the newly created image. you will only see gzip.

Additional Information

  • Dockerfile
    FROM python:3.8
    WORKDIR /app
    CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 app:app

  • Kaniko Image
    v1.15 (working): gcr.io/kaniko-project/executor@sha256:9a798741047d3761221100f586ea9fa8a3f09957176630faeb77923894b7355a
    v1.22 (not working): gcr.io/kaniko-project/executor@sha256:7b3699e9e105521075812cd3f3f4c62c913cb5cd113c929975502022df3bcf60

  • Sidequest?
    docker buildx has a force-compression parameter, that recompresses base layers as zstd. adding this as an option to kaniko would be helpful.

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing
  • - [N]
Please check if the build works in docker but not in kaniko
  • - [Y]
Please check if this error is seen when you use --cache flag
  • - [Y]
Please check if your dockerfile is a multistage dockerfile
  • - [N]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant