atlantis icon indicating copy to clipboard operation
atlantis copied to clipboard

Reduce container image size of Atlantis

Open patrickdung opened this issue 4 months ago • 0 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Describe the user story It is found that the container image of atlantis is quite large (around 1GB) and for us, we need to include terragrunt and more tools in the future.

Here is a finding: Inside a container image 273987739 -rwxr-xr-x 1 root root 90579096 Apr 9 13:03 terraform 273987741 -rwxr-xr-x 1 root root 90579096 Apr 9 13:03 terraform1.11.4

Same content, but the i-node is different, so it is using extra storage (~90MB in here) I think it's the same case for opentofu (another ~87MB)

Describe the solution you'd like Suggestions:

  1. Use of softlink/hardlink for tofu/terraform to the latest version
  2. or use of other de-duplicate/hardlink tools for tofu/terraform to the latest version
  3. also consider reduce the no of terraform to ship to 3 or 2 versions instead of 4 versions
  4. For Debian based container image, some packages are installed but I think they are not needed, like gcc-12-base openssh-server openssh-sftp-server
  5. Finally, may be also consider container image squashing (buildx/buildah) to further reduce image size?

Describe the drawbacks of your solution

Describe alternatives you've considered

patrickdung avatar Oct 07 '25 18:10 patrickdung