https://github.com/yybit/static-os
A lightweight linux distro for hosting containers.
https://github.com/yybit/static-os
containers lima linux linux-distribution qemu rust
Last synced: 3 months ago
JSON representation
A lightweight linux distro for hosting containers.
- Host: GitHub
- URL: https://github.com/yybit/static-os
- Owner: yybit
- License: apache-2.0
- Created: 2024-02-22T15:23:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-09T14:56:35.000Z (over 2 years ago)
- Last Synced: 2025-01-18T16:17:57.563Z (over 1 year ago)
- Topics: containers, lima, linux, linux-distribution, qemu, rust
- Language: Rust
- Homepage:
- Size: 103 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Static OS
Static OS is a lightweight linux distro for hosting containers. The project is still in early development.
## Feature
* No library dependency, all binary are statically linked.
* Immutable root fs, /var is writable.
* Support multiple cpu arch. [WIP]
* Support kubernetes. [WIP]
* Atomic update, double partition flip. [WIP]
* API driven, declaration configuration. [WIP]
## Components
* Kernel
* CA Cert
* Busybox
* Iptables
* Runc
* CNI Plugins
* Containerd
* Nerdctl
* Openssh [optional]
* Static init
## Usage
### Prepare
Before building image, [Docker](https://www.docker.com/) or [Nerdctl](https://github.com/containerd/nerdctl) need to be installed.
If you cross-compile the image,run this to support multiple platform.
```shell
# docker or nerdctl
docker run --privileged --rm tonistiigi/binfmt --install all
```
### Build components
```shell
# Use `docker` cli by default
make kernel busybox iptables openssh
# Use a docker-compatible cli
make kernel busybox iptables openssh DOCKER_CLI='lima sudo nerdctl'
```
### Build disk image
```shell
# Use `docker` cli by default
make img
# Use a docker-compatible cli
make img DOCKER_CLI='lima sudo nerdctl'
```
### Run disk image with qemu
```shell
make run
```
### Run disk image with lima
```
make lima
limactl shell base
```