github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/g3doc/user_guide/quick_start/oci.md (about) 1 # OCI Quick Start 2 3 This guide will quickly get you started running your first gVisor sandbox 4 container using the runtime directly with the default platform. 5 6 First, follow the [Installation guide][install]. 7 8 ## Run an OCI compatible container 9 10 Now we will create an [OCI][oci] container bundle to run our container. First we 11 will create a root directory for our bundle. 12 13 ```bash 14 mkdir bundle 15 cd bundle 16 ``` 17 18 Create a root file system for the container. We will use the Docker 19 `hello-world` image as the basis for our container. 20 21 ```bash 22 mkdir rootfs 23 docker export $(docker create hello-world) | tar -xf - -C rootfs 24 ``` 25 26 Next, create an specification file called `config.json` that contains our 27 container specification. We tell the container to run the `/hello` program. 28 29 ```bash 30 runsc spec -- /hello 31 ``` 32 33 Finally run the container. 34 35 ```bash 36 sudo runsc run hello 37 ``` 38 39 Next try [using CNI to set up networking](../../../tutorials/cni/) or 40 [running gVisor using Docker](../docker/). 41 42 [oci]: https://opencontainers.org/ 43 [install]: /docs/user_guide/install