diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-05-12 12:55:23 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-05-12 12:55:23 -0700 |
commit | a3f97a757a8d6e18f03acecb68b484cc1608c3ae (patch) | |
tree | 293c51eb9786bc1b8371daaeec2985b17b5b3ec9 /g3doc/user_guide/quick_start/oci.md | |
parent | 6a4466a46cd551825198fbafc3b734ab5608019a (diff) | |
parent | 5f3a256425f4fa99fd3e5363418c5978659cecf3 (diff) |
Merge pull request #2513 from amscanne:website-integrated
PiperOrigin-RevId: 311184385
Diffstat (limited to 'g3doc/user_guide/quick_start/oci.md')
-rw-r--r-- | g3doc/user_guide/quick_start/oci.md | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/g3doc/user_guide/quick_start/oci.md b/g3doc/user_guide/quick_start/oci.md new file mode 100644 index 000000000..57bcc4f63 --- /dev/null +++ b/g3doc/user_guide/quick_start/oci.md @@ -0,0 +1,45 @@ +# OCI + +This guide will quickly get you started running your first gVisor sandbox +container using the runtime directly with the default platform. + +First, follow the [Installation guide][install]. + +## Run an OCI compatible container + +Now we will create an [OCI][oci] container bundle to run our container. First we +will create a root directory for our bundle. + +```bash +mkdir bundle +cd bundle +``` + +Create a root file system for the container. We will use the Docker hello-world +image as the basis for our container. + +```bash +mkdir rootfs +docker export $(docker create hello-world) | tar -xf - -C rootfs +``` + +Next, create an specification file called `config.json` that contains our +container specification. We will update the default command it runs to `/hello` +in the `hello-world` container. + +```bash +runsc spec +sed -i 's;"sh";"/hello";' config.json +``` + +Finally run the container. + +```bash +sudo runsc run hello +``` + +Next try [using CNI to set up networking](../../../tutorials/cni/) or +[running gVisor using Docker](../docker/). + +[oci]: https://opencontainers.org/ +[install]: /docs/user_guide/install |