diff options
author | Ian Lewis <ianlewis@google.com> | 2018-11-29 04:48:15 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-11-29 04:49:20 -0800 |
commit | db0473b1bec1481e5a7807752b5eaa72c816c562 (patch) | |
tree | fc0f2f05b36507c783a6300bc30bba33e965e91d /docs/user_guide/docker.md | |
parent | 4d0da37cbb81292c66a8d7a7b8d5658450a847f5 (diff) |
Add a new docs directory. refs #109
Add a new 'docs' directory for that can be built on in the future. Docs are
divided into a 'user guide', 'contributor guide', and 'architecture guide'.
This is currently a work in progress.
PiperOrigin-RevId: 223326836
Change-Id: I78d08d6a89d686e92d3415d4269463e8e74bddee
Diffstat (limited to 'docs/user_guide/docker.md')
-rw-r--r-- | docs/user_guide/docker.md | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/docs/user_guide/docker.md b/docs/user_guide/docker.md new file mode 100644 index 000000000..fefb5f993 --- /dev/null +++ b/docs/user_guide/docker.md @@ -0,0 +1,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 +``` |