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

Commit 5d0fde4

Browse files
ctalledorodnymolina
authored andcommitted
Updated sysbox docs regarding lack of support for Docker snap pkg.
1 parent 614b2f7 commit 5d0fde4

File tree

5 files changed

+185
-77
lines changed

5 files changed

+185
-77
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ The Linux host on which Sysbox runs must meet the following requirements:
8585

8686
2) Systemd must be the system's process-manager (the default in the supported distros).
8787

88-
3) Docker must be installed.
88+
3) Docker must be [installed natively](docs/user-guide/install.md#docker-installation) (**not** with the Docker snap package).
8989

9090
## Installation
9191

@@ -274,8 +274,8 @@ The [K8s.io KinD](https://kind.sigs.k8s.io) project produces a CLI tool called
274274
It's an excellent tool that makes deployment of K8s cluster in containers fast &
275275
easy.
276276

277-
When used with the Sysbox container runtime, the capabilities of the "kind" tool
278-
are enhanced:
277+
Sysbox complements this tool. When used with the Sysbox container runtime, the
278+
capabilities of the "kind" tool are enhanced:
279279

280280
- The containerized K8s clusters consume **significantly less host
281281
storage** (70% reduction for a 10-node cluster!).
@@ -285,7 +285,7 @@ are enhanced:
285285
- You can use Sysbox to **easily** embed inner pod images into the K8s nodes.
286286

287287
Moreover, with Sysbox, you can easily create a containerized K8s cluster without
288-
using the K8s.io kind tool, by using very simple Docker images and Docker run
288+
using the K8s.io KinD tool, by using very simple Docker images and Docker run
289289
commands.
290290

291291
We've created a tool called "kindbox" that is a simple wrapper around Docker
@@ -295,7 +295,7 @@ This results in simple images and gives you full control of the
295295
cluster configuration. The Sysbox runtime does the heavy lifting of ensuring
296296
that K8s runs seamlessly inside the containers.
297297

298-
The Sysbox [user-guide](docs/user-guide/kind.md) has more on this.
298+
The Sysbox [quickstart-guide](docs/quickstart/kind.md) and [user-guide](docs/user-guide/kind.md) have more on this.
299299

300300
## Troubleshooting
301301

docs/quickstart/kind.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,11 @@ K8s.io KinD + Sysbox).
803803
required during the image build process (i.e, you can revert the config
804804
once the build completes if you wish).
805805

806+
NOTE: if using the Ubuntu Docker snap package, edit the
807+
`/var/snap/docker/current/etc/docker/daemon.json` file instead of
808+
`/etc/docker/daemon.json` below. You can tell if you are using the Docker
809+
snap package if `which docker` yields `/snap/bin/docker`.
810+
806811
```console
807812
# more /etc/docker/daemon.json
808813
{
@@ -817,6 +822,9 @@ K8s.io KinD + Sysbox).
817822

818823
2) Stop all containers and restart the Docker service:
819824

825+
NOTE: if using the Ubuntu Docker snap package, do `$ sudo snap restart docker`
826+
instead of `systemctl restart docker.service` below.
827+
820828
```console
821829
$ docker stop $(docker ps -aq)
822830
$ sudo systemctl restart docker.service

docs/user-guide/install.md

Lines changed: 109 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,25 @@
22

33
## Contents
44

5+
- [Host Requirements](#host-requirements)
56
- [Installing Sysbox](#installing-sysbox)
67
- [Uninstalling Sysbox](#uninstalling-sysbox)
8+
- [Docker Installation](#docker-installation)
79

8-
## Installing Sysbox
9-
10-
### Host Requirements
10+
## Host Requirements
1111

1212
The Linux host on which Sysbox runs must meet the following requirements:
1313

1414
1) It must have one of the [supported Linux distros](../distro-compat.md).
1515

1616
2) Systemd must be the system's process-manager (the default in the supported distros).
1717

18-
3) Docker must be installed.
18+
3) Docker must be installed natively (i.e., **not** with the Docker snap package).
1919

20-
### Installation Steps
20+
- See [below](#docker-installation) if you have a Docker snap installation and
21+
need to change it to a native installation.
22+
23+
## Installing Sysbox
2124

2225
1) Download the latest Sysbox package from the [release](https://github.com/nestybox/sysbox-external/releases) page.
2326

@@ -64,7 +67,7 @@ If you are curious on what the other Sysbox services are, refer to the [design s
6467

6568
If you hit problems during installation, see the [Troubleshooting doc](troubleshoot.md).
6669

67-
### Docker Configuration
70+
### Docker Runtime Configuration
6871

6972
During installation, the Sysbox installer will reconfigure the Docker daemon such
7073
that it detects the Sysbox runtime. It does this by adding the following
@@ -80,6 +83,15 @@ configuration to `/etc/docker/daemon.json` and sending a signal (SIGHUP) to Dock
8083
}
8184
```
8285

86+
If all is well, Docker will recognize the Sysbox runtime:
87+
88+
```console
89+
$ docker info | grep -i runtime
90+
WARNING: No swap limit support
91+
Runtimes: runc sysbox-runc
92+
Default Runtime: runc
93+
```
94+
8395
### Docker Userns-Remap
8496

8597
In addition, the Sysbox installer will detect if Docker needs to be placed
@@ -114,16 +126,16 @@ Otherwise, the Sysbox installer will add the following `userns-remap` entry to t
114126
}
115127
```
116128

117-
The installer will then ask the user if Docker should be restarted. If
118-
the user responds affirmatively, the installer will restart Docker. Otherwise,
119-
the user will need to restart Docker manually (e.g., `systemctl restart docker`)
120-
before using Sysbox.
129+
The installer will then ask the user if Docker should be restarted. If the user
130+
responds affirmatively, the installer will restart Docker
131+
automatically. Otherwise, the user will need to restart Docker manually (e.g.,
132+
`systemctl restart docker`) before using Sysbox.
121133

122134
When Docker is placed in userns-remap mode, there are a couple of caveats to
123135
keep in mind:
124136

125137
- Configuring Docker this way places a few functional limitations on regular
126-
Docker containers (those launched with Docker's default runc), as described
138+
Docker containers (those launched with Docker's default `runc`), as described
127139
in this [Docker document](https://docs.docker.com/engine/security/userns-remap).
128140

129141
- System container isolation, while strong, is reduced compared to using
@@ -154,3 +166,89 @@ $ sudo dpkg --purge sysbox
154166
```console
155167
$ sudo userdel sysbox
156168
```
169+
170+
## Docker Installation
171+
172+
Ubuntu offers two methods for installing Docker:
173+
174+
1) Via `apt get` (aka native installation)
175+
176+
2) Via `snap install` (aka snappy installation)
177+
178+
In recent versions of Ubuntu, (2) is the default approach. For example, while installing
179+
Ubuntu Focal on a VM, the installer will ask if you want to install Docker. If you answer
180+
"yes", it will use the snappy installation method.
181+
182+
You can tell if Docker is installed via a snap by doing:
183+
184+
```console
185+
$ which docker
186+
/snap/bin/docker
187+
```
188+
189+
Unfortunately, Sysbox **does not currently support** working with Docker when the latter is
190+
installed via a snap package. We are working on resolving this.
191+
192+
In the meantime, you **must install Docker natively** (method (1) above).
193+
194+
These are the steps to do so:
195+
196+
1) If Docker is installed via a snap, remove the snap:
197+
198+
```console
199+
$ sudo snap remove docker
200+
docker removed
201+
```
202+
203+
2) Install Docker natively.
204+
205+
Follow the instructions in this [Docker doc](https://docs.docker.com/engine/install/ubuntu/).
206+
207+
3) Confirm Docker is installed natively:
208+
209+
```console
210+
$ which docker
211+
/usr/bin/docker
212+
```
213+
214+
4) Make sure you are in the `docker` group:
215+
216+
```console
217+
$ sudo usermod -a -G docker $(whoami)
218+
```
219+
220+
You may need to log-out and log-in for the group setting to take effect.
221+
222+
If you are not in the `docker` group (or have no sudo privileges), you'll see an error such as:
223+
224+
```console
225+
$ docker run -it alpine
226+
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: ... connect: permission denied
227+
```
228+
229+
5) Verify Docker works:
230+
231+
```console
232+
$ docker run -it alpine
233+
Unable to find image 'alpine:latest' locally
234+
latest: Pulling from library/alpine
235+
df20fa9351a1: Pull complete
236+
Digest: sha256:185518070891758909c9f839cf4ca393ee977ac378609f700f60a771a2dfe321
237+
Status: Downloaded newer image for alpine:latest
238+
/ #
239+
```
240+
241+
At this point you have Docker working, and can now [install Sysbox](#installing-sysbox).
242+
243+
If you want to revert back to the Docker snap, the steps are below, but keep in
244+
mind that Sysbox **won't work**.
245+
246+
1) Uninstall the native Docker
247+
248+
See [here](https://docs.docker.com/engine/install/ubuntu/#uninstall-old-versions).
249+
250+
2) Re-install the Docker snap:
251+
252+
```console
253+
$ sudo snap install docker
254+
```

docs/user-guide/security.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ Sysbox will check for this. If the module is required but not present in the
220220
Linux kernel, Sysbox will fail to launch containers and issue an error such as
221221
[this one](troubleshoot.md#ubuntu-shiftfs-module-not-present).
222222

223-
Note that shiftfs is not present in all Ubuntu kernels. See
224-
[here](../distro-compat.md) for more info.
223+
Note that shiftfs is present in Ubuntu Desktop and Server editions, but likely
224+
not present in Ubuntu cloud editions.
225225

226226
## Procfs Virtualization
227227

0 commit comments

Comments
 (0)