summaryrefslogtreecommitdiffhomepage
path: root/docs/user_guide/docker.md
blob: fefb5f9939c1ebd4ded1de1354146ecfb2954f5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Run gVisor with Docker

## Configuring Docker

Next, 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][docker-storage-driver].

In the end, the file should look something like:

```
{
    "runtimes": {
        "runsc": {
            "path": "/usr/local/bin/runsc"
        }
    }
}
```

You must restart the Docker daemon after making changes to this file, typically
this is done via:

```
sudo systemctl restart docker
```

## Running a container

Now run your container in `runsc`:

```
docker run --runtime=runsc hello-world
```

You can also run a terminal to explore the container.

```
docker run --runtime=runsc -it ubuntu /bin/bash
```