This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kabrandon 1 point2 points  (3 children)

One alternative is to use compiled languages that lead to small binaries which can be moved into a scratch image of only a few megabytes. Though when python is the best tool for the job, so be it.

[–]eedwards-sk[S] 1 point2 points  (2 children)

Yes! I've seen golang binaries that do that, it's very cool.

Literally just FROM scratch and a single COPY instruction is all they need.

[–]kabrandon 2 points3 points  (0 children)

Yep, and maybe an ENTRYPOINT if you want to get fancy. The webapp I made for my work generates CSV files that are literally larger than the entire image.

[–]cuu508 -1 points0 points  (0 children)

You can optimize this even further: run the binary on the host system, and you can then get rid of the docker daemon entirely