github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/g3doc/user_guide/install.md (about) 1 # Installation 2 3 [TOC] 4 5 > Note: gVisor supports only x86\_64 and requires Linux 4.14.77+ 6 > ([older Linux](./networking.md#gso)). 7 8 ## Install latest release {#install-latest} 9 10 To download and install the latest release manually follow these steps: 11 12 ```bash 13 ( 14 set -e 15 ARCH=$(uname -m) 16 URL=https://storage.googleapis.com/gvisor/releases/release/latest/${ARCH} 17 wget ${URL}/runsc ${URL}/runsc.sha512 \ 18 ${URL}/containerd-shim-runsc-v1 ${URL}/containerd-shim-runsc-v1.sha512 19 sha512sum -c runsc.sha512 \ 20 -c containerd-shim-runsc-v1.sha512 21 rm -f *.sha512 22 chmod a+rx runsc containerd-shim-runsc-v1 23 sudo mv runsc containerd-shim-runsc-v1 /usr/local/bin 24 ) 25 ``` 26 27 To install gVisor as a Docker runtime, run the following commands: 28 29 ```bash 30 /usr/local/bin/runsc install 31 sudo systemctl reload docker 32 docker run --rm --runtime=runsc hello-world 33 ``` 34 35 For more details about using gVisor with Docker, see 36 [Docker Quick Start](./quick_start/docker.md) 37 38 Note: It is important to copy `runsc` to a location that is readable and 39 executable to all users, since `runsc` executes itself as user `nobody` to avoid 40 unnecessary privileges. The `/usr/local/bin` directory is a good place to put 41 the `runsc` binary. 42 43 ## Install from an `apt` repository 44 45 First, appropriate dependencies must be installed to allow `apt` to install 46 packages via https: 47 48 ```bash 49 sudo apt-get update && \ 50 sudo apt-get install -y \ 51 apt-transport-https \ 52 ca-certificates \ 53 curl \ 54 gnupg-agent \ 55 software-properties-common 56 ``` 57 58 Next, the configure the key used to sign archives and the repository: 59 60 ```bash 61 curl -fsSL https://gvisor.dev/archive.key | sudo apt-key add - 62 sudo add-apt-repository "deb [arch=amd64,arm64] https://storage.googleapis.com/gvisor/releases release main" 63 ``` 64 65 Now the runsc package can be installed: 66 67 ```bash 68 sudo apt-get update && sudo apt-get install -y runsc 69 ``` 70 71 If you have Docker installed, it will be automatically configured. 72 73 ## Versions 74 75 The `runsc` binaries and repositories are available in multiple versions and 76 release channels. You should pick the version you'd like to install. For 77 experimentation, the nightly release is recommended. For production use, the 78 latest release is recommended. 79 80 After selecting an appropriate release channel from the options below, proceed 81 to the preferred installation mechanism: manual or from an `apt` repository. 82 83 > Note: Older releases are still available but may not have an `${ARCH}` 84 > component in the URL. These release were available for `x86_64` only. 85 86 ### HEAD 87 88 Binaries are available for every commit on the `master` branch, and are 89 available at the following URL: 90 91 `https://storage.googleapis.com/gvisor/releases/master/latest/${ARCH}` 92 93 You can use this link with the steps described in 94 [Install latest release](#install-latest). 95 96 For `apt` installation, use the `master` to configure the repository: 97 98 ```bash 99 sudo add-apt-repository "deb [arch=amd64,arm64] https://storage.googleapis.com/gvisor/releases master main" 100 ``` 101 102 ### Nightly 103 104 Nightly releases are built most nights from the master branch, and are available 105 at the following URL: 106 107 `https://storage.googleapis.com/gvisor/releases/nightly/latest/${ARCH}` 108 109 You can use this link with the steps described in 110 [Install latest release](#install-latest). 111 112 Specific nightly releases can be found at: 113 114 `https://storage.googleapis.com/gvisor/releases/nightly/${yyyy-mm-dd}/${ARCH}` 115 116 Note that a release may not be available for every day. 117 118 For `apt` installation, use the `nightly` to configure the repository: 119 120 ```bash 121 sudo add-apt-repository "deb [arch=amd64,arm64] https://storage.googleapis.com/gvisor/releases nightly main" 122 ``` 123 124 ### Latest release 125 126 The latest official release is available at the following URL: 127 128 `https://storage.googleapis.com/gvisor/releases/release/latest/${ARCH}` 129 130 You can use this link with the steps described in 131 [Install latest release](#install-latest). 132 133 For `apt` installation, use the `release` to configure the repository: 134 135 ```bash 136 sudo add-apt-repository "deb [arch=amd64,arm64] https://storage.googleapis.com/gvisor/releases release main" 137 ``` 138 139 ### Specific release 140 141 Specific releases are the latest [point release](#point-release) for a given 142 date. Specific releases should be available for any date that has a point 143 release. A given release is available at the following URL: 144 145 `https://storage.googleapis.com/gvisor/releases/release/${yyyymmdd}/${ARCH}` 146 147 You can use this link with the steps described in 148 [Install latest release](#install-latest). 149 150 See the [releases](https://github.com/google/gvisor/releases) page for 151 information about specific releases. 152 153 For `apt` installation of a specific release, which may include point updates, 154 use the date of the release for repository, e.g. `${yyyymmdd}`. 155 156 ```bash 157 sudo add-apt-repository "deb [arch=amd64,arm64] https://storage.googleapis.com/gvisor/releases yyyymmdd main" 158 ``` 159 160 > Note: only newer releases may be available as `apt` repositories. 161 162 ### Point release 163 164 Point releases correspond to 165 [releases](https://github.com/google/gvisor/releases) tagged in the Github 166 repository. A given point release is available at the following URL: 167 168 `https://storage.googleapis.com/gvisor/releases/release/${yyyymmdd}.${rc}/${ARCH}` 169 170 You can use this link with the steps described in 171 [Install latest release](#install-latest). 172 173 Note that `apt` installation of a specific point release is not supported. 174 175 After installation, try out `runsc` by following the 176 [Docker Quick Start](./quick_start/docker.md), 177 [Containerd QuickStart](./containerd/quick_start.md), or 178 [OCI Quick Start](./quick_start/oci.md).