mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Update the Docker quickstart to use 'runsc install'
PiperOrigin-RevId: 312573487
This commit is contained in:
@@ -150,11 +150,8 @@ users, and ensure it is executable by all users**, since `runsc` executes itself
|
||||
as user `nobody` to avoid unnecessary privileges. The `/usr/local/bin` directory
|
||||
is a good place to put the `runsc` binary.
|
||||
|
||||
After installation, the`runsc` binary comes with an `install` command that can
|
||||
optionally automatically configure Docker:
|
||||
|
||||
```bash
|
||||
runsc install
|
||||
```
|
||||
After installation, try out `runsc` by following the
|
||||
[Docker Quick Start](./quick_start/docker.md) or
|
||||
[OCI Quick Start](./quick_start/oci.md).
|
||||
|
||||
[releases]: https://github.com/google/gvisor/releases
|
||||
|
||||
@@ -14,24 +14,28 @@ the next section and proceed straight to running a container.
|
||||
## Configuring Docker
|
||||
|
||||
First you will need to configure Docker to use `runsc` by adding a runtime entry
|
||||
to your Docker configuration (`/etc/docker/daemon.json`). You may have to create
|
||||
this file if it does not exist. Also, some Docker versions also require you to
|
||||
[specify the `storage-driver` field][storage-driver].
|
||||
to your Docker configuration (e.g. `/etc/docker/daemon.json`). The easiest way
|
||||
to this is via the `runsc install` command. This will install a docker runtime
|
||||
named "runsc" by default.
|
||||
|
||||
In the end, the file should look something like:
|
||||
|
||||
```json
|
||||
{
|
||||
"runtimes": {
|
||||
"runsc": {
|
||||
"path": "/usr/local/bin/runsc"
|
||||
}
|
||||
}
|
||||
}
|
||||
```bash
|
||||
sudo runsc install
|
||||
```
|
||||
|
||||
You must restart the Docker daemon after making changes to this file, typically
|
||||
this is done via `systemd`:
|
||||
You may also wish to install a runtime entry for debugging. The `runsc install`
|
||||
command can accept options that will be passed to the runtime when it is invoked
|
||||
by Docker.
|
||||
|
||||
```bash
|
||||
sudo runsc install --runtime runsc-debug -- \
|
||||
--debug \
|
||||
--debug-log=/tmp/runsc-debug.log \
|
||||
--strace \
|
||||
--log-packets
|
||||
```
|
||||
|
||||
You must restart the Docker daemon after installing the runtime. Typically this
|
||||
is done via `systemd`:
|
||||
|
||||
```bash
|
||||
sudo systemctl restart docker
|
||||
|
||||
Reference in New Issue
Block a user