As the title says. I build containers for my platforms/clients/myself-selfhosted@home and you would not believe how much smaller you can get your images. Here’s an example when slimming one of my images:

cmd=build info=results status='MINIFIED' by='18.97X' size.original='1.0 GB' size.optimized='55 MB' 

That’s a Python app that I didn’t have to do multi-staged build with docker because of the Slim command. And it’s a working version of that app that I’m using today.

Same for one of my flutter apps that I thought it was as small as it could be:

cmd=build info=results status='MINIFIED' by='1.98X' size.original='66 MB' size.optimized='33 MB'

TLDR: slim your container images!! https://github.com/slimtoolkit/slim

  • FancyGUI@lemmy.fancywhale.caOP
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    COuldn’t agree more on this! Honestly. I understand that people want hefty descriptions with few inputs on their side, but this is sad.

    Anyways! Some of my python cronjobs that I run on my cluster don’t have an exposed service, and I can still make it work just fine by passing along the --exec flag and the stuff that takes to run the app. The complicated part is to define properly your environment variables that are necessary to run your use-cases and make sure that you execute all the necessary files. It’s not a solution that fits all, for sure! And I honestly don’t use it for everything. It’s a tool to be used in some use-cases

    • maor@lemmy.org.il
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 year ago

      Oh there’s an --exec flag as well? That’s great. This seems like a totally viable solution for cases where the crux of the container is a small script, with a handful of decision branches so the surface area to cover is manageable, but it also needs to come in a non-alpine distro because I assume that’s the hefty part that we’re like to remove. But that’s just off the top of my head, I’m sure there’s more. It’s genuinely a good idea and it deserves a respectful README as well :(