diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2021-12-27 01:44:53 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2021-12-27 01:44:53 +0100 |
| commit | a66d22924c1001c4298e0c290aa2e40c5c418f1e (patch) | |
| tree | 6da8ec8028f1458a310ab95f14745fd8708d149b | |
| parent | 666bb7abdbbd69530656f1c8ecbaea6bb8ac8996 (diff) | |
| download | mitjafelicijan.com-a66d22924c1001c4298e0c290aa2e40c5c418f1e.tar.gz | |
Post changes
| -rw-r--r-- | posts/2021-12-25-running-golang-application-as-pid1.md | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/posts/2021-12-25-running-golang-application-as-pid1.md b/posts/2021-12-25-running-golang-application-as-pid1.md index 62687ce..c211c8b 100644 --- a/posts/2021-12-25-running-golang-application-as-pid1.md +++ b/posts/2021-12-25-running-golang-application-as-pid1.md | |||
| @@ -7,7 +7,17 @@ Created: 2021-12-25 | |||
| 7 | Tags: [] | 7 | Tags: [] |
| 8 | --- | 8 | --- |
| 9 | 9 | ||
| 10 | 10 | 1. [Unikernels, kernels, and alike](#unikernels-kernels-and-alike) | |
| 11 | 2. [What is PID 1?](#what-is-pid-1) | ||
| 12 | 3. [So why even run application as PID 1 instead of just using a container?](#so-why-even-run-application-as-pid-1-instead-of-just-using-a-container) | ||
| 13 | 4. [The master plan](#the-master-plan) | ||
| 14 | 5. [Compiling Linux kernel](#compiling-linux-kernel) | ||
| 15 | 6. [Preparing PID 1 application in Golang](#preparing-pid-1-application-in-golang) | ||
| 16 | 7. [Running all of it with QEMU](#running-all-of-it-with-qemu) | ||
| 17 | 8. [Size comparison](#size-comparison) | ||
| 18 | 9. [Is running applications as PID 1 even worth it?](#is-running-applications-as-pid-1-even-worth-it) | ||
| 19 | |||
| 20 | ## Unikernels, kernels, and alike | ||
| 11 | 21 | ||
| 12 | I have been reading a lot about [unikernernels](https://en.wikipedia.org/wiki/Unikernel) lately and found them very intriguing. When you push away all the marketing speak and look at the idea, it makes a lot of sense. | 22 | I have been reading a lot about [unikernernels](https://en.wikipedia.org/wiki/Unikernel) lately and found them very intriguing. When you push away all the marketing speak and look at the idea, it makes a lot of sense. |
| 13 | 23 | ||
| @@ -63,7 +73,7 @@ The idea of running this as PID 1 would result in a significantly smaller footpr | |||
| 63 | 73 | ||
| 64 | > You could run a simple init system inside Docker container described more in this article [Docker and the PID 1 zombie reaping problem](https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/). | 74 | > You could run a simple init system inside Docker container described more in this article [Docker and the PID 1 zombie reaping problem](https://blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/). |
| 65 | 75 | ||
| 66 | ## The plan | 76 | ## The master plan |
| 67 | 77 | ||
| 68 | 1. Compile Linux kernel with the default definitions. | 78 | 1. Compile Linux kernel with the default definitions. |
| 69 | 2. Prepare a Hello World application in Golang that is statically compiled. | 79 | 2. Prepare a Hello World application in Golang that is statically compiled. |
