Apify Discord Mirror

Updated 5 months ago

Question: About docker image size

At a glance

The community members discuss whether reducing the size of a Docker image can decrease loading time and make the application load faster. One community member states that a smaller Docker image size can slightly decrease startup times, but the differences may not be significant. Another community member shares their experience of reducing the image size to 55.6 MB by using a Python-based HTTP-only application, and another community member is curious about how they achieved such a low image size. The discussion also includes a suggestion to use a smaller base image, copy as little as possible, and use multi-stage builds to further reduce the image size, with one community member mentioning they were able to shrink the image by switching to Rust and using the "FROM scratch" base image.

Hello Team! Does reducing Docker size will reduce loading time and make the Actor load faster ... or ... is it the same ?
Thank You!
Attachment
Screenshot_2024-06-14_173524.png
1
M
J
!
5 comments
Yes, a smaller Docker image's size slightly decreases startup times, but don't expect huge differences.
55.6 MB, did you manage to shrink chrome that much? Or is this HTTP only?
yes, its Python HTTP only
Hello @!!!Joefree!!! πŸ‘‘ wonder how you did decrease the image size that low ? Also using http only and it is curently 165MB
Try using a smaller base image, copy as little as possible, using multi-stage builds.
I've shrunk the image by switching to rust and using FROM scratch for base image :rustcrab:
Attachment
image.png
Add a reply
Sign up and join the conversation on Discord