Live data from Hacker News

A tiny Docker image to serve static websites

lipanski.com

11–20 of 156 posts

Re: A tiny Docker image to serve static websites

#11

Redbean is just 155Kb without the need for alpine or any other dependency. You just copy the Redbean binary and your static assets, no complicated build steps and hundred MB download necessary. Check it out: https://github.com/kissgyorgy/redbean-docker

And it does https/tls, where thttpd does not.

Re: A tiny Docker image to serve static websites

#12
post #2

I love stuff like this. People will remark about how this is a waste of time, others will say it is absolutely necessary, even more will laud it just for the fun of doing it. I'm in the middle camp. I wish software/systems engineers would spend more time optomising for size and performance.

The difference between a systems engineer and a software engineer is that to a systems engineer a half functioning 5MB docker image is okay but to a software engineer a fully functional 5GB Node image is fine.

Premature optimisation? 5 gb doesn’t matter. It’s not great, don’t get me wrong.

Re: A tiny Docker image to serve static websites

#13

But why would you prefer Docker like this over, for example, running thttpd directly? Saves you a lot of Ram an indirection?

I don’t want to touch the root of my server. I rather add a new container that doesn’t modify anything on the root.

Benefits: can cleanly and delete 100% of what was installed. If you use something on root can always infect, save cache, logs…

I don’t want to impact anything else running on my server. I don’t want anything to depend on that either silently.

Docker is the best thing. I just can’t understand how people still can’t get the benefits yet.

Is Amazing to start a project you had 3 years ago and just works and you can deploy without reading any docs. Just spin a docker container. Eat, safe and just works.

Re: A tiny Docker image to serve static websites

#14
post #8
post #2

I love stuff like this. People will remark about how this is a waste of time, others will say it is absolutely necessary, even more will laud it just for the fun of doing it. I'm in the middle camp. I wish software/systems engineers would spend more time optomising for size and performance.

Wouldn't removing Docker entirely be a good optimization?

In terms of CPU cycles and disk space, maybe. In terms of engineer cycles, absolutely not. Which costs more?

Re: A tiny Docker image to serve static websites

#15

Redbean is just 155Kb without the need for alpine or any other dependency. You just copy the Redbean binary and your static assets, no complicated build steps and hundred MB download necessary. Check it out: https://github.com/kissgyorgy/redbean-docker

Wow! This is the Redbean which is an "Actually Portable Executable", or a binary that can run on a range of OSes (Linux, Windows, MacOS, BSDs).

http://justine.lol/ape.html

Re: A tiny Docker image to serve static websites

#16
post #8

Earlier quoted context omitted.

Wouldn't removing Docker entirely be a good optimization?

In terms of CPU cycles and disk space, maybe. In terms of engineer cycles, absolutely not. Which costs more?

Hmm, a SCP shell script on my laptop, prompting my SSH key's password and deploying the site to the target machine?

Or a constantly-updating behemoth, running as root, installing packages from yet another unauditable repository chain?

Re: A tiny Docker image to serve static websites

#17
post #11

Redbean is just 155Kb without the need for alpine or any other dependency. You just copy the Redbean binary and your static assets, no complicated build steps and hundred MB download necessary. Check it out: https://github.com/kissgyorgy/redbean-docker

And it does https/tls, where thttpd does not.

I'm confused how the author considers thttpd more 'battle tested' if it doesn't resolve https.

Either way though, it's a great article I'm glad the author took to write. His docker practices are wonderful, wish more engineers would use them.

Re: A tiny Docker image to serve static websites

#19
post #8

Earlier quoted context omitted.

Wouldn't removing Docker entirely be a good optimization?

Docker adds other value to the lifecycle of your deployment. An "optimization" where you're removing value is just a compromise. Otherwise we'd all run our static sites on UEFI.

yeah see some of us still do this on OSes that haven't turned into a giant bloated hodgepodge of security theatre and false panacea software.

docker has dead whale on the beach vibes. what value does it offer to those of us who have moved on from the mess linux is becoming?

Post reply on HN