minibase
tini
minibase | tini | |
---|---|---|
1 | 28 | |
179 | 10,286 | |
0.6% | 1.6% | |
1.8 | 0.0 | |
4 months ago | 10 months ago | |
C | C | |
GNU General Public License v3.0 only | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
minibase
-
Portable Executable
I remember simple use cases for clone() such as spawning child processes with just enough shared resources to execve(). I remember reading a lot of old emails from Torvalds about it, can't find them anymore.
I used to value portability but now I believe in using Linux everywhere and for everything. I like OpenBSD too but Linux is the stable one you can build anything on. What I wanted to eventually accomplish is a 100% freestanding Linux user space with no libraries at all. Maybe boot straight into the program I want to use, just like we can pass init=/usr/bin/bash in the kernel command line. How far could this go? Using nothing but system calls it's actually possible to get a framebuffer and use software renderering to draw some graphics. I'm guessing pretty far.
By starting from scratch like this it's possible to fix all the historical problems with our systems. For example, I think it's unacceptable when libraries keep global state. This can't be fixed without getting rid of libc and its buffers and caches and errno. Removing this cruft would actually simplify a threads implementation. And then there's completely insane stuff that should be dropped like .init and .fini sections:
https://blogs.oracle.com/solaris/init-and-fini-processing-wh...
A similar statically-linked user space project I found years ago:
https://github.com/arsv/minibase
tini
- Tini: A tiny but valid `init` for containers
-
Running tests in containers with docker-compose
FROM cimg/ruby:2.7.1 ARG TINI_VERSION=v0.19.0 RUN sudo apt-get update -qq \ && sudo apt-get install -yq --no-install-recommends \ libxml2-dev libxslt-dev libtool pkg-config \ libbz2-dev libglib2.0-dev libxml2-dev libxslt-dev cmake \ && sudo apt-get clean \ && sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ && sudo truncate -s 0 /var/log/*log ENV BUNDLE_JOBS=4 BUNDLE_RETRY=3 RUN gem update --system && gem install rake bundler --no-document ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/local/bin/tini RUN sudo chmod a+x /usr/local/bin/tini ENTRYPOINT ["/usr/local/bin/tini", "--"]
- Anakin – Automatically Kill Orphans
-
Freenginx.org
yes busybox httpd or civetweb is even smaller, both around 300kb.
for tini you mean https://github.com/krallin/tini? how large is your final docker image, why not just alpine in that case which is musl+busybox
-
🚨Avoid this when running containerized applications in production
Tini, a useful process manager for containerized apps
-
Should You Be Scared of Unix Signals?
Ah gotcha. I believe it can be baked into images as well, per the entrypoint example in the readme: https://github.com/krallin/tini
Not sure how this will fare IRL in k8s as I haven’t much experience there. It’s still silly that this is the default behavior where you need something like Tini, but I digress.
-
The Tailscale Universal Docker Mod
To be fair, even for running a single process the pitfalls are real. I've been seeing Tini[1] a lot for these situations.
I just read in the README that Tini is included by Docker since 1.13 if using --init flag.
[1] https://github.com/krallin/tini
-
docker run --init flag doesn't seem to work on Mac
The default init process used is the first docker-init executable found in the system path of the Docker daemon process. This docker-init binary, included in the default installation, is backed by tini.
- ส่อง Dockerfile for Go
- Learning by doing: An HTTP API with Rust
What are some alternatives?
liblinux - Linux system calls.
dumb-init - A minimal init system for Linux containers
mrsh - A minimal POSIX shell
systemd - The systemd System and Service Manager
s6 - The s6 supervision suite.
torsocks - Library to torify application - NOTE: upstream has been moved to https://gitweb.torproject.org/torsocks.git