2
2
3
3
## Contents
4
4
5
+ - [ Host Requirements] ( #host-requirements )
5
6
- [ Installing Sysbox] ( #installing-sysbox )
6
7
- [ Uninstalling Sysbox] ( #uninstalling-sysbox )
8
+ - [ Docker Installation] ( #docker-installation )
7
9
8
- ## Installing Sysbox
9
-
10
- ### Host Requirements
10
+ ## Host Requirements
11
11
12
12
The Linux host on which Sysbox runs must meet the following requirements:
13
13
14
14
1 ) It must have one of the [ supported Linux distros] ( ../distro-compat.md ) .
15
15
16
16
2 ) Systemd must be the system's process-manager (the default in the supported distros).
17
17
18
- 3 ) Docker must be installed.
18
+ 3 ) Docker must be installed natively (i.e., ** not ** with the Docker snap package) .
19
19
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
21
24
22
25
1 ) Download the latest Sysbox package from the [ release] ( https://github.com/nestybox/sysbox-external/releases ) page.
23
26
@@ -64,7 +67,7 @@ If you are curious on what the other Sysbox services are, refer to the [design s
64
67
65
68
If you hit problems during installation, see the [ Troubleshooting doc] ( troubleshoot.md ) .
66
69
67
- ### Docker Configuration
70
+ ### Docker Runtime Configuration
68
71
69
72
During installation, the Sysbox installer will reconfigure the Docker daemon such
70
73
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
80
83
}
81
84
```
82
85
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
+
83
95
### Docker Userns-Remap
84
96
85
97
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
114
126
}
115
127
```
116
128
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.
121
133
122
134
When Docker is placed in userns-remap mode, there are a couple of caveats to
123
135
keep in mind:
124
136
125
137
- 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
127
139
in this [ Docker document] ( https://docs.docker.com/engine/security/userns-remap ) .
128
140
129
141
- System container isolation, while strong, is reduced compared to using
@@ -154,3 +166,89 @@ $ sudo dpkg --purge sysbox
154
166
``` console
155
167
$ sudo userdel sysbox
156
168
```
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
+ ```
0 commit comments