this post was submitted on 14 Jul 2023
121 points (93.5% liked)

Selfhosted

40152 readers
657 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] FancyGUI@lemmy.fancywhale.ca 2 points 1 year ago (1 children)

Yep, same thing I found out! Crazy to see my already quite slim image being reduce all that much!

[–] theterrasque@infosec.pub 3 points 1 year ago* (last edited 1 year ago) (1 children)

Crazy to see my already quite slim image being reduce all that much!

*size.original='1.0 GB' *

I mean.... I don't know what that does, of course, but I would rarely use "quite slim" to describe that :D

"size.original='66 MB' size.optimized='33 MB'"

This one's nice though

[–] FancyGUI@lemmy.fancywhale.ca 1 points 1 year ago

Yeah? I meant the 66MB one. The 1GB was an image that I just installed everything necessary to compile my code and run from the same image. I didn’t try to make it “right”. Nice to know I don’t have to worry about it though!