Skip to content

Commit bdbbd0e

Browse files
committed
Bump version to 0.1.5 and fix table formatting across docs
1 parent 324ec6b commit bdbbd0e

File tree

7 files changed

+66
-66
lines changed

7 files changed

+66
-66
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sdme"
3-
version = "0.1.3"
3+
version = "0.1.5"
44
edition = "2021"
55
description = "Lightweight systemd-nspawn containers with overlayfs"
66
license = "MIT"

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Download a static binary from [fiorix.github.io/sdme](https://fiorix.github.io/s
99
Runs on Linux with systemd. Uses kernel overlayfs for copy-on-write storage. By default, containers are overlayfs clones of `/` but you can also import rootfs from other distros (Ubuntu, Debian, Fedora, NixOS; see [docs/nix](docs/nix/)).
1010

1111
**Why does this even exist?**
12-
Here's my pitch: from a linux system with just systemd and sdme, you can create and run any container and cloud image that exists today. 1 binary.
12+
Here's my pitch: from a linux system with just systemd and sdme, you can create and run any container and cloud image that exists today.
1313

1414
Check out the [sdme architecture](docs/architecture.md) for details about what this is and how it works. The containers we create are booted systemd containers.
1515

@@ -54,13 +54,13 @@ sdme can also run OCI application images (nginx, mysql, etc.) as systemd service
5454

5555
### Runtime
5656

57-
| Program | Package | Required for |
58-
|---------|---------|--------------|
59-
| `systemd` (>= 252) | `systemd` | All commands (D-Bus communication) |
60-
| `systemd-nspawn` | `systemd-container` | Running containers (`sdme start`) |
61-
| `machinectl` | `systemd-container` | `sdme join`, `sdme exec`, `sdme new` |
62-
| `journalctl` | `systemd` | `sdme logs` |
63-
| `qemu-nbd` | `qemu-utils` | `sdme fs import` (QCOW2 images only) |
57+
| Program | Package | Required for |
58+
|----------------------|----------------------|---------------------------------------|
59+
| `systemd` (>= 252) | `systemd` | All commands (D-Bus communication) |
60+
| `systemd-nspawn` | `systemd-container` | Running containers (`sdme start`) |
61+
| `machinectl` | `systemd-container` | `sdme join`, `sdme exec`, `sdme new` |
62+
| `journalctl` | `systemd` | `sdme logs` |
63+
| `qemu-nbd` | `qemu-utils` | `sdme fs import` (QCOW2 images only) |
6464

6565
### Install all dependencies (Debian/Ubuntu)
6666

docs/architecture.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,12 @@ friends.
285285
**Compression auto-detection** uses magic bytes rather than file extensions.
286286
The first few bytes of a file reveal its compression format:
287287

288-
| Magic bytes | Format |
289-
|---------------------|--------|
290-
| `1f 8b` | gzip |
291-
| `BZh` | bzip2 |
292-
| `fd 37 7a 58 5a 00` | xz |
293-
| `28 b5 2f fd` | zstd |
288+
| Magic bytes | Format |
289+
|------------------------|--------|
290+
| `1f 8b` | gzip |
291+
| `BZh` | bzip2 |
292+
| `fd 37 7a 58 5a 00` | xz |
293+
| `28 b5 2f fd` | zstd |
294294

295295
This means `sdme fs import ubuntu rootfs.tar.zst` works even if the file is
296296
named `rootfs.tar`, because the content, not the name, determines the decompressor.
@@ -578,11 +578,11 @@ specs are validated for format (`HOST:CONTAINER[/PROTO]`) and range (1-65535).
578578

579579
sdme exposes three cgroup-based resource controls:
580580

581-
| Flag | systemd property | Example |
582-
|---------------------------|------------------|-----------------------------------------|
583-
| `--memory <size>` | `MemoryMax=` | `--memory 2G` |
584-
| `--cpus <count>` | `CPUQuota=` | `--cpus 0.5` (50%), `--cpus 2` (200%) |
585-
| `--cpu-weight <1-10000>` | `CPUWeight=` | `--cpu-weight 100` |
581+
| Flag | systemd property | Example |
582+
|--------------------------|------------------|----------------------------------------|
583+
| `--memory <size>` | `MemoryMax=` | `--memory 2G` |
584+
| `--cpus <count>` | `CPUQuota=` | `--cpus 0.5` (50%), `--cpus 2` (200%) |
585+
| `--cpu-weight <1-10000>` | `CPUWeight=` | `--cpu-weight 100` |
586586

587587
These flags are available on `sdme create`, `sdme new`, and `sdme set`. They
588588
are applied via a systemd drop-in file (`limits.conf`) installed alongside the
@@ -618,13 +618,13 @@ pipe-separated) and reconstituted into nspawn arguments on every start.
618618

619619
sdme stores its settings in a TOML file at `~/.config/sdme/sdmerc`:
620620

621-
| Setting | Default | Description |
622-
|----------------------------|--------------------------------|------------------------------------------------------------------------|
623-
| `interactive` | `true` | Enable interactive prompts |
624-
| `datadir` | `/var/lib/sdme` | Root directory for all container and rootfs data |
625-
| `boot_timeout` | `60` | Seconds to wait for container boot before giving up |
626-
| `join_as_sudo_user` | `true` | Join host-rootfs containers as `$SUDO_USER` instead of root |
627-
| `host_rootfs_opaque_dirs` | `/etc/systemd/system,/var/log` | Default opaque dirs for host-rootfs containers (empty string disables) |
621+
| Setting | Default | Description |
622+
|---------------------------|--------------------------------|------------------------------------------------------------------------|
623+
| `interactive` | `true` | Enable interactive prompts |
624+
| `datadir` | `/var/lib/sdme` | Root directory for all container and rootfs data |
625+
| `boot_timeout` | `60` | Seconds to wait for container boot before giving up |
626+
| `join_as_sudo_user` | `true` | Join host-rootfs containers as `$SUDO_USER` instead of root |
627+
| `host_rootfs_opaque_dirs` | `/etc/systemd/system,/var/log` | Default opaque dirs for host-rootfs containers (empty string disables) |
628628

629629
Settings are read with `sdme config get` and written with `sdme config set <key> <value>`.
630630

docs/devfd-shim.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ real `open()`. All other paths fall through to the real `openat` syscall.
5050

5151
The intercepted paths are:
5252

53-
| Path | Result |
54-
|------|--------|
55-
| `/dev/stdin` | `dup(0)` |
56-
| `/dev/stdout` | `dup(1)` |
57-
| `/dev/stderr` | `dup(2)` |
58-
| `/dev/fd/0` | `dup(0)` |
59-
| `/dev/fd/1` | `dup(1)` |
60-
| `/dev/fd/2` | `dup(2)` |
61-
| `/proc/self/fd/0` | `dup(0)` |
62-
| `/proc/self/fd/1` | `dup(1)` |
63-
| `/proc/self/fd/2` | `dup(2)` |
53+
| Path | Result |
54+
|--------------------|----------|
55+
| `/dev/stdin` | `dup(0)` |
56+
| `/dev/stdout` | `dup(1)` |
57+
| `/dev/stderr` | `dup(2)` |
58+
| `/dev/fd/0` | `dup(0)` |
59+
| `/dev/fd/1` | `dup(1)` |
60+
| `/dev/fd/2` | `dup(2)` |
61+
| `/proc/self/fd/0` | `dup(0)` |
62+
| `/proc/self/fd/1` | `dup(1)` |
63+
| `/proc/self/fd/2` | `dup(2)` |
6464

6565
The `dup()` call returns a new file descriptor that refers to the same
6666
underlying kernel object (the journal socket). Since `write()` on a socket fd
@@ -79,10 +79,10 @@ that they can close without affecting the original.
7979

8080
The shared library is generated at import time matching the host architecture:
8181

82-
| Architecture | Syscall ABI | Binary Size |
83-
|---|---|---|
84-
| x86_64 | `syscall` instruction, rax=nr | ~4 KiB |
85-
| aarch64 | `svc #0` instruction, x8=nr | ~4 KiB |
82+
| Architecture | Syscall ABI | Binary Size |
83+
|--------------|-------------------------------|-------------|
84+
| x86_64 | `syscall` instruction, rax=nr | ~4 KiB |
85+
| aarch64 | `svc #0` instruction, x8=nr | ~4 KiB |
8686

8787
The binaries are generated purely in Rust (no assembler, no external tools,
8888
no libc) by the `src/devfd_shim/` module.
@@ -183,12 +183,12 @@ approximately 4 KiB.
183183

184184
The module structure follows the same pattern as `drop_privs`:
185185

186-
| File | Purpose |
187-
|------|---------|
188-
| `src/devfd_shim/mod.rs` | Public API: `generate(Arch) -> Vec<u8>` |
189-
| `src/devfd_shim/elf.rs` | ET_DYN ELF builder with SysV hash table |
190-
| `src/devfd_shim/x86_64.rs` | x86_64 machine code emitter |
191-
| `src/devfd_shim/aarch64.rs` | AArch64 machine code emitter |
186+
| File | Purpose |
187+
|-----------------------------|------------------------------------------|
188+
| `src/devfd_shim/mod.rs` | Public API: `generate(Arch) -> Vec<u8>` |
189+
| `src/devfd_shim/elf.rs` | ET_DYN ELF builder with SysV hash table |
190+
| `src/devfd_shim/x86_64.rs` | x86_64 machine code emitter |
191+
| `src/devfd_shim/aarch64.rs` | AArch64 machine code emitter |
192192

193193
Both architecture modules use their own `Asm` struct with a label/fixup system
194194
tailored to the ISA (x86_64 uses rel8/rel32 fixups for variable-length

docs/drop-privs.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ Each syscall is checked for errors. On failure, a diagnostic message is written
4444

4545
The ELF binary is generated at import time matching the host architecture:
4646

47-
| Architecture | Syscall ABI | Binary Size |
48-
|---|---|---|
49-
| x86_64 | `syscall` instruction, rax=nr | < 1 KiB |
50-
| aarch64 | `svc #0` instruction, x8=nr | < 1 KiB |
47+
| Architecture | Syscall ABI | Binary Size |
48+
|--------------|-------------------------------|-------------|
49+
| x86_64 | `syscall` instruction, rax=nr | < 1 KiB |
50+
| aarch64 | `svc #0` instruction, x8=nr | < 1 KiB |
5151

5252
The binaries are generated purely in Rust (no assembler, no external tools) by the `src/drop_privs/` module.
5353

@@ -105,10 +105,10 @@ The privilege-dropping sequence is designed to be irreversible:
105105

106106
The OCI `User` field supports several formats:
107107

108-
| Format | Behavior |
109-
|---|---|
110-
| `""`, `"root"`, `"0"` | Root; uses standard `User=root` |
111-
| `"name"` | Resolved via `etc/passwd` in OCI rootfs |
112-
| `"uid"` | Used directly; primary GID from `etc/passwd` if found, else gid=uid |
113-
| `"name:group"` | User from `etc/passwd`, group from `etc/group` |
114-
| `"uid:gid"` | Both used directly |
108+
| Format | Behavior |
109+
|------------------------|---------------------------------------------------------------------|
110+
| `""`, `"root"`, `"0"` | Root; uses standard `User=root` |
111+
| `"name"` | Resolved via `etc/passwd` in OCI rootfs |
112+
| `"uid"` | Used directly; primary GID from `etc/passwd` if found, else gid=uid |
113+
| `"name:group"` | User from `etc/passwd`, group from `etc/group` |
114+
| `"uid:gid"` | Both used directly |

docs/oci.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ A systemd service unit (`sdme-oci-app.service`) is generated that chroots into
3333

3434
The `--oci-mode` flag lets you override auto-detection:
3535

36-
| Flag | Behavior |
37-
|------|----------|
38-
| `--oci-mode=auto` | Auto-detect from image config (default) |
39-
| `--oci-mode=base` | Force base OS mode |
40-
| `--oci-mode=app` | Force application mode (requires `--base-fs`) |
41-
| `--oci-mode=connector` | Force connector mode (requires `--base-fs`) |
36+
| Flag | Behavior |
37+
|------------------------|-----------------------------------------------|
38+
| `--oci-mode=auto` | Auto-detect from image config (default) |
39+
| `--oci-mode=base` | Force base OS mode |
40+
| `--oci-mode=app` | Force application mode (requires `--base-fs`) |
41+
| `--oci-mode=connector` | Force connector mode (requires `--base-fs`) |
4242

4343
## How it works
4444

0 commit comments

Comments
 (0)