Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit 614b2f7

Browse files
ctalledorodnymolina
authored andcommitted
Updated installation instructions and re-organized these a bit.
1 parent a5bb2d6 commit 614b2f7

File tree

9 files changed

+226
-119
lines changed

9 files changed

+226
-119
lines changed

README.md

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
- [Host Requirements](#host-requirements)
1111
- [Installation](#installation)
1212
- [Launching a System Container](#launching-a-system-container)
13-
- [Shiftfs](#shiftfs)
1413
- [Sysbox Features](#sysbox-features)
1514
- [Documentation](#documentation)
1615
- [Integration with Container Managers](#integration-with-container-managers)
@@ -102,7 +101,9 @@ $ sha256sum sysbox_0.1.3-0.ubuntu-disco_amd64.deb
102101
774aa1442c9142a1e6c6db49f896439b989de3668926bccd91aa0a679fa3df87 sysbox_0.1.3-0.ubuntu-disco_amd64.deb
103102
```
104103

105-
3) Install the Sysbox package:
104+
3) Stop all running Docker containers (as the installer may need to restart Docker).
105+
106+
4) Install the Sysbox package and follow the installer instructions:
106107

107108
```console
108109
$ sudo dpkg -i sysbox_0.1.3-0.ubuntu-disco_amd64.deb
@@ -118,7 +119,7 @@ $ sudo apt-get install -f -y
118119
This will install the missing dependencies and automatically re-launch
119120
the Sysbox installation process.
120121

121-
4) Verify that Sysbox's Systemd units have been properly installed, and
122+
5) Verify that Sysbox's Systemd units have been properly installed, and
122123
associated daemons are properly running:
123124

124125
```console
@@ -131,9 +132,7 @@ sysbox.service loaded active exited Sysbox General Ser
131132
Note: the sysbox.service is ephemeral (it exits once it launches the other sysbox services; that's why
132133
you see `sysbox.service loaded active exited` above).
133134

134-
If you are curious on what the other Sysbox services are, refer to the [Sysbox User Guide](docs/user-guide/design.md).
135-
136-
If you hit problems during installation, see the [Troubleshooting doc](docs/user-guide/troubleshoot.md).
135+
See [here](docs/user-guide/install.md) for more info.
137136

138137
## Launching a System Container
139138

@@ -157,20 +156,6 @@ regular Docker containers; they won't conflict and can co-exist side-by-side.
157156
The [Sysbox Quickstart Guide](docs/quickstart/README.md) and the [Nestybox Blog Site](https://blog.nestybox.com) have
158157
many usage examples.
159158

160-
## Shiftfs
161-
162-
Recent Ubuntu kernels carry a module called "shiftfs" that Sysbox uses to create
163-
the system containers.
164-
165-
When launching the system container, if you see an error such as:
166-
167-
docker: Error response from daemon: OCI runtime create failed: container requires user-ID shifting but error was found: shiftfs module is not loaded in the kernel. Update your kernel to include shiftfs module or enable Docker with userns-remap. Refer to the Sysbox troubleshooting guide for more info: unknown
168-
169-
it means that your kernel version is a bit older than needed by Sysbox.
170-
171-
You can work-around this by enabling the "userns-remap mode" in Docker. Refer to
172-
the [distro compatibility doc](docs/distro-compat.md) for more info.
173-
174159
## Sysbox Features
175160

176161
### Integrates with Docker

docs/distro-compat.md

Lines changed: 5 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -13,83 +13,19 @@ on adding support for more distros.
1313

1414
## Ubuntu Support
1515

16-
Sysbox requires very recent Ubuntu versions:
16+
Sysbox requires recent Ubuntu versions:
1717

1818
- Ubuntu 20.04 "Focal Fossa"
1919
- Ubuntu 19.10 "Eoan Ermine"
2020
- Ubuntu 18.04 "Bionic Beaver" (with kernel upgrade >= 5.0)
2121

22-
These versions carry some new Linux kernel features, including a module called
23-
"shiftfs", which Sysbox uses to create the system containers.
22+
These versions carry some new Linux kernel features that Sysbox relies on to
23+
create the system containers.
2424

25-
If your Ubuntu version does not carry the shiftfs module, you'll see this error
26-
when launching a container:
27-
28-
```console
29-
# docker run --runtime=sysbox-runc -it debian:latest
30-
docker: Error response from daemon: OCI runtime create failed: container requires user-ID shifting but error was found: shiftfs module is not loaded in the kernel. Update your kernel to include shiftfs module or enable Docker with userns-remap. Refer to the Sysbox troubleshooting guide for more info: unknown
31-
```
32-
33-
Don't worry: you can still use Sysbox, but it requires that you configure Docker
34-
with "userns-remap" (see the next section).
35-
36-
**NOTES:**
37-
38-
1) Canonical generates Ubuntu editions for desktop, server, and cloud VMs. The
39-
[cloud editions](https://cloud-images.ubuntu.com/) may not carry the the shiftfs
40-
module. If you want to use Sysbox on a cloud VM and you hit the error shown
41-
above, you must either configure Docker with userns-remap as shown in the next
42-
section, or install the Ubuntu desktop or server edition in the VM.
43-
44-
2) If you have a Ubuntu 18.04 (Bionic Beaver), you need to upgrade the kernel to >= 5.0.
25+
**NOTE:** If you have Ubuntu 18.04 (Bionic Beaver), you need to upgrade the kernel to >= 5.0.
4526
We recommend using Ubuntu's [LTS-enablement](https://wiki.ubuntu.com/Kernel/LTSEnablementStack)
46-
package to do the upgrade:
27+
package to do the upgrade as follows:
4728

4829
```console
4930
$ sudo apt-get update && sudo apt install --install-recommends linux-generic-hwe-18.04 -y
5031
```
51-
52-
### Using Sysbox on kernels without the shiftfs module
53-
54-
If your Ubuntu version does not carry the shiftfs module, using Sysbox requires
55-
that you configure Docker in "userns-remap" mode.
56-
57-
This is done by modifying the configuration of the Docker daemon and restarting it:
58-
59-
- After installing Sysbox, add the `userns-remap` line to the
60-
`/etc/docker/daemon.json` file as shown below:
61-
62-
```console
63-
# cat /etc/docker/daemon.json
64-
{
65-
"userns-remap": "sysbox",
66-
"runtimes": {
67-
"sysbox-runc": {
68-
"path": "/usr/local/sbin/sysbox-runc"
69-
}
70-
}
71-
}
72-
```
73-
74-
This tells Docker to use the Linux user namespace in all containers
75-
and map the root user in the container to the subid range of
76-
user `sysbox`, as defined in the `/etc/subuid` and `/etc/subgid` files.
77-
78-
- Then restart the Docker daemon (make sure any running containers are stopped):
79-
80-
```console
81-
# sudo docker stop $(docker ps -aq)
82-
# sudo systemctl restart docker.service
83-
```
84-
85-
Note that the actions above require `root` privileges on the host.
86-
87-
When Docker is configured this way, Sysbox no longer needs the shiftfs
88-
module. But there are a couple of drawbacks:
89-
90-
- Configuring Docker this way places a few functional limitations on regular Docker containers
91-
(those launched with Docker's default runc), as described in this [Docker document](https://docs.docker.com/engine/security/userns-remap).
92-
93-
- System container isolation, while strong, is reduced compared to using shiftfs.
94-
That's because userns-remap causes Docker to put Sysbox into "Directed Userns ID Mapping" mode.
95-
See [here](user-guide/security.md#user-namespace-id-mapping) for more info on this.

docs/quickstart/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This document shows, by way of example, how to deploy system containers and
44
quickly take advantage of their features.
55

6-
It assumes you've [installed](../../README.md#supported-distros) Sysbox.
6+
It assumes you've [installed](../user-guide/install.md) Sysbox.
77

88
For an in-depth description of Sysbox's functionality, refer to the [Sysbox Users Guide](../user-guide/README.md).
99

@@ -27,7 +27,7 @@ how to use system containers.
2727
### Kubernetes-in-Docker
2828

2929
- [Why Sysbox for K8s-in-Docker?](kind.md#why-sysbox-for-k8s-in-docker)
30-
- [Using K8s.io KinD + Sysbox](kind.md#using-k8sio-kind--sysbox)
30+
- [Using K8s.io KinD + Sysbox](kind.md#using-k8sio-kind--sysbox-kind-sysbox)
3131
- [Using Kindbox](kind.md#using-kindbox)
3232
- [Using Docker to Deploy a K8s Cluster](kind.md#using-docker-to-deploy-a-k8s-cluster)
3333
- [Preloading Inner Pod Images into the K8s Node Image](kind.md#preloading-inner-pod-images-into-the-k8s-node-image)

docs/quickstart/dind.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ This section shows examples for running Docker inside system containers.
55
The [User Guide](../user-guide/dind.md) describes this functionality in
66
deeper detail.
77

8+
## Contents
9+
10+
- [Deploy a System Container with Docker inside](#deploy-a-system-container-with-docker-inside)
11+
- [Deploy a System Container with Systemd, sshd, and Docker inside](#deploy-a-system-container-with-systemd-sshd-and-docker-inside)
12+
- [Deploy a System Container with Supervisord and Docker inside](#deploy-a-system-container-with-supervisord-and-docker-inside)
13+
- [Persistence of Inner Container Images using Docker Volumes](#persistence-of-inner-container-images-using-docker-volumes)
14+
- [Persistence of Inner Container Images using Bind Mounts](#persistence-of-inner-container-images-using-bind-mounts)
15+
816
## Deploy a System Container with Docker inside
917

1018
We will use a system container image that has Alpine + Docker inside. It's called
@@ -415,12 +423,12 @@ There are a couple of important caveats to keep in mind:
415423
- A Docker volume mounted into the system container's `/var/lib/docker` must
416424
only be mounted on a **single system container at any given time**.
417425

418-
- This is a restriction imposed by the Docker daemon, which does not allow
419-
its image cache to be shared concurrently among multiple daemon
420-
instances.
426+
- This is a restriction imposed by the Docker daemon, which does not allow
427+
its image cache to be shared concurrently among multiple daemon
428+
instances.
421429

422-
- Sysbox will check for violations of this rule and report an
423-
appropriate error during system container creation.
430+
- Sysbox will check for violations of this rule and report an
431+
appropriate error during system container creation.
424432

425433
- A Docker volume mounted into the system container's `/var/lib/docker`
426434
will **inherit** any files present in that same directory as part of the system

docs/quickstart/kind.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ This section shows several examples on how to do this.
99
The [User Guide](../user-guide/kind.md) describes this functionality in more
1010
detail.
1111

12+
## Contents
13+
14+
- [Why Sysbox for K8s-in-Docker?](#why-sysbox-for-k8s-in-docker)
15+
- [Using K8s.io KinD + Sysbox (kind-sysbox)](#using-k8sio-kind--sysbox-kind-sysbox)
16+
- [Using Kindbox](#using-kindbox)
17+
- [Using Docker to Deploy a K8s Cluster](#using-docker-to-deploy-a-k8s-cluster)
18+
- [Preloading Inner Pod Images into the K8s Node Image](#preloading-inner-pod-images-into-the-k8s-node-image)
19+
1220
## Why Sysbox for K8s-in-Docker?
1321

1422
Sysbox is the first container runtime capable of creating containers that can
@@ -30,15 +38,15 @@ Here is a comparison for deploying a 10-node K8s cluster:
3038

3139
| Criteria | K8s.io KinD (w/o Sysbox) | K8s.io KinD (with Sysbox) | Kindbox |
3240
| ------------------------------ | :----------------------: | :-----------------------: | :-----: |
33-
| Host storage overhead | 10 GB | 3 GB | 1 GB |
34-
| Cluster creation time | 2 min | 2 min | 2 min |
35-
| Cluster deletion time | 5 sec | 20 sec | 13 sec |
36-
| Simple Docker images | No | No | Yes |
37-
| Full control of cluster config | No | No | Yes |
38-
| Dynamically resize cluster | No | No | Yes |
39-
| Mixed cluster node images | No | No | Yes |
40-
| Easily preload inner images | No | Yes | Yes |
41-
| Strong isolation from host | No | Yes | Yes |
41+
| Host storage overhead | 10 GB | 3 GB | 1 GB |
42+
| Cluster creation time | 2 min | 2 min | 2 min |
43+
| Cluster deletion time | 5 sec | 20 sec | 13 sec |
44+
| Simple Docker images | No | No | Yes |
45+
| Full control of cluster config | No | No | Yes |
46+
| Dynamically resize cluster | No | No | Yes |
47+
| Mixed cluster node images | No | No | Yes |
48+
| Easily preload inner images | No | Yes | Yes |
49+
| Strong isolation from host | No | Yes | Yes |
4250

4351
The sections below show examples of this.
4452

docs/user-guide/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ functionality.
1313

1414
[Concepts & Terminology](concepts.md)
1515

16+
[Installing Sysbox](install.md)
17+
1618
[Deploying System Containers](deploy.md)
1719

1820
[Docker-in-Docker](dind.md)

0 commit comments

Comments
 (0)