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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce container image size #2657

Closed
jessefarinacci opened this issue Sep 6, 2023 · 3 comments
Closed

reduce container image size #2657

jessefarinacci opened this issue Sep 6, 2023 · 3 comments
Labels
enhancement New feature or request infracost team These issues will be handled by the core Infracost team

Comments

@jessefarinacci
Copy link

Infracost providers a Docker image for user convenience: https://hub.docker.com/r/infracost/infracost 馃憤

The image is quite large by modern standards:

$ docker image ls
infracost/infracost                     0.10.29           b69bd0436d1a   5 days ago          1.11GB
infracost/infracost                     0.10.28           ea17ae9d8cb0   4 weeks ago         1.11GB
infracost/infracost                     0.10.27           82cabc659f35   4 weeks ago         1.12GB
infracost/infracost                     0.10.26           d6fafabec5bd   6 weeks ago         1.11GB
infracost/infracost                     0.10.25           71440496b450   6 weeks ago         1.11GB
infracost/infracost                     0.10.20           67271e15e39c   4 months ago        1.11GB
infracost/infracost                     0.10.15           0ed29f1c4cee   8 months ago        1.1GB
infracost/infracost                     0.10.10           320192726e50   13 months ago       1.1GB
infracost/infracost                     0.10.5            13c4c9fbb932   14 months ago       1.1GB
infracost/infracost                     0.10.1            7f329e1ee902   15 months ago       1.09GB

There are alternatives reduce the size of the image considerably: https://github.com/minidocks/images/tree/master/infracost

$ docker image ls | grep infra
infracost/infracost                     latest            b69bd0436d1a   5 days ago          1.11GB
minidocks/infracost                     latest            753aed9906c4   2 hours ago         62.7MB

This issue requests reducing the container image size. For reference, and perhaps revealing the root cause:

$ docker image ls | grep interesting
infracost/infracost                     latest            b69bd0436d1a   5 days ago          1.11GB
python                                  latest            79d47d6fa793   12 days ago         1.01GB
golang                                  latest            b1c406e816b2   2 weeks ago         822MB
ubuntu                                  latest            6a47e077731f   3 weeks ago         69.2MB
@aliscott
Copy link
Member

aliscott commented Sep 6, 2023

Thanks @jessefarinacci. I agree it's too large. We have some work in progress to reduce the dependencies in it in #2617, but we probably won't get time to wrap this up until October. This should reduce the size down to 114MB.

In the meantime I'd recommend using the infracost/infracost:ci-* images which are around 325MB in size (still too big, but at least a bit better).

@aliscott aliscott added enhancement New feature or request infracost team These issues will be handled by the core Infracost team labels Sep 6, 2023
@jessefarinacci
Copy link
Author

Thank you @aliscott! I subscribed to that other issue. I'm OK with closing this issue if that's your recommendation. Thx!

@aliscott
Copy link
Member

aliscott commented Sep 6, 2023

Thanks @jessefarinacci!

@aliscott aliscott closed this as completed Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request infracost team These issues will be handled by the core Infracost team
Projects
None yet
Development

No branches or pull requests

2 participants