2020-04-28 05:24:58 +00:00
|
|
|
# Installation
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-04-30 01:54:48 +00:00
|
|
|
[TOC]
|
|
|
|
|
|
|
|
> Note: gVisor supports only x86\_64 and requires Linux 4.14.77+
|
|
|
|
> ([older Linux](./networking.md#gso)).
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
## Install latest release {#install-latest}
|
|
|
|
|
|
|
|
To download and install the latest release manually follow these steps:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
URL=https://storage.googleapis.com/gvisor/releases/release/latest
|
|
|
|
wget ${URL}/runsc ${URL}/runsc.sha512
|
|
|
|
sha512sum -c runsc.sha512
|
|
|
|
rm -f runsc.sha512
|
|
|
|
sudo mv runsc /usr/local/bin
|
|
|
|
sudo chmod a+rx /usr/local/bin/runsc
|
|
|
|
)
|
|
|
|
```
|
|
|
|
|
|
|
|
To install gVisor with Docker, run the following commands:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
/usr/local/bin/runsc install
|
|
|
|
sudo systemctl restart docker
|
|
|
|
docker run --rm --runtime=runsc hello-world
|
|
|
|
```
|
|
|
|
|
|
|
|
For more details about using gVisor with Docker, see
|
|
|
|
[Docker Quick Start](./quick_start/docker.md)
|
|
|
|
|
|
|
|
Note: It is important to copy `runsc` to a location that is readable and
|
|
|
|
executable to all users, since `runsc` executes itself as user `nobody` to avoid
|
|
|
|
unnecessary privileges. The `/usr/local/bin` directory is a good place to put
|
|
|
|
the `runsc` binary.
|
|
|
|
|
|
|
|
## Install from an `apt` repository
|
|
|
|
|
|
|
|
First, appropriate dependencies must be installed to allow `apt` to install
|
|
|
|
packages via https:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo apt-get update && \
|
|
|
|
sudo apt-get install -y \
|
|
|
|
apt-transport-https \
|
|
|
|
ca-certificates \
|
|
|
|
curl \
|
|
|
|
gnupg-agent \
|
|
|
|
software-properties-common
|
|
|
|
```
|
|
|
|
|
|
|
|
Next, the configure the key used to sign archives and the repository:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
curl -fsSL https://gvisor.dev/archive.key | sudo apt-key add -
|
|
|
|
sudo add-apt-repository "deb https://storage.googleapis.com/gvisor/releases release main"
|
|
|
|
```
|
|
|
|
|
|
|
|
Now the runsc package can be installed:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo apt-get update && sudo apt-get install -y runsc
|
|
|
|
```
|
|
|
|
|
|
|
|
If you have Docker installed, it will be automatically configured.
|
|
|
|
|
2019-09-12 07:26:09 +00:00
|
|
|
## Versions
|
|
|
|
|
|
|
|
The `runsc` binaries and repositories are available in multiple versions and
|
2019-10-18 04:32:14 +00:00
|
|
|
release channels. You should pick the version you'd like to install. For
|
2019-09-12 07:26:09 +00:00
|
|
|
experimentation, the nightly release is recommended. For production use, the
|
|
|
|
latest release is recommended.
|
|
|
|
|
|
|
|
After selecting an appropriate release channel from the options below, proceed
|
|
|
|
to the preferred installation mechanism: manual or from an `apt` repository.
|
|
|
|
|
2019-11-05 22:55:06 +00:00
|
|
|
### HEAD
|
|
|
|
|
|
|
|
Binaries are available for every commit on the `master` branch, and are
|
|
|
|
available at the following URL:
|
|
|
|
|
2020-05-12 19:55:23 +00:00
|
|
|
`https://storage.googleapis.com/gvisor/releases/master/latest/runsc`
|
2020-09-18 18:19:04 +00:00
|
|
|
`https://storage.googleapis.com/gvisor/releases/master/latest/runsc.sha512`
|
2019-11-05 22:55:06 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
You can use this link with the steps described in
|
|
|
|
[Install latest release](#install-latest).
|
2019-11-05 22:55:06 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
For `apt` installation, use the `master` to configure the repository:
|
2019-11-05 22:55:06 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
```bash
|
|
|
|
sudo add-apt-repository "deb https://storage.googleapis.com/gvisor/releases master main"
|
|
|
|
```
|
2019-10-24 05:59:45 +00:00
|
|
|
|
2019-09-12 07:26:09 +00:00
|
|
|
### Nightly
|
|
|
|
|
|
|
|
Nightly releases are built most nights from the master branch, and are available
|
|
|
|
at the following URL:
|
|
|
|
|
2020-05-12 19:55:23 +00:00
|
|
|
`https://storage.googleapis.com/gvisor/releases/nightly/latest/runsc`
|
|
|
|
`https://storage.googleapis.com/gvisor/releases/nightly/latest/runsc.sha512`
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
You can use this link with the steps described in
|
|
|
|
[Install latest release](#install-latest).
|
|
|
|
|
2019-09-12 07:26:09 +00:00
|
|
|
Specific nightly releases can be found at:
|
|
|
|
|
2020-05-12 19:55:23 +00:00
|
|
|
`https://storage.googleapis.com/gvisor/releases/nightly/${yyyy-mm-dd}/runsc`
|
2019-09-12 07:26:09 +00:00
|
|
|
|
|
|
|
Note that a release may not be available for every day.
|
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
For `apt` installation, use the `nightly` to configure the repository:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo add-apt-repository "deb https://storage.googleapis.com/gvisor/releases nightly main"
|
|
|
|
```
|
2019-09-12 07:26:09 +00:00
|
|
|
|
|
|
|
### Latest release
|
|
|
|
|
|
|
|
The latest official release is available at the following URL:
|
|
|
|
|
2020-05-12 19:55:23 +00:00
|
|
|
`https://storage.googleapis.com/gvisor/releases/release/latest`
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
You can use this link with the steps described in
|
|
|
|
[Install latest release](#install-latest).
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
For `apt` installation, use the `release` to configure the repository:
|
2019-09-12 07:26:09 +00:00
|
|
|
|
|
|
|
```bash
|
2020-09-18 18:19:04 +00:00
|
|
|
sudo add-apt-repository "deb https://storage.googleapis.com/gvisor/releases release main"
|
2019-09-12 07:26:09 +00:00
|
|
|
```
|
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
### Specific release
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
A given release release is available at the following URL:
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
`https://storage.googleapis.com/gvisor/releases/release/${yyyymmdd}`
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
You can use this link with the steps described in
|
|
|
|
[Install latest release](#install-latest).
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
See the [releases](https://github.com/google/gvisor/releases) page for
|
|
|
|
information about specific releases.
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
For `apt` installation of a specific release, which may include point updates,
|
|
|
|
use the date of the release for repository, e.g. `${yyyymmdd}`.
|
2019-09-12 07:26:09 +00:00
|
|
|
|
|
|
|
```bash
|
2020-09-18 18:19:04 +00:00
|
|
|
sudo add-apt-repository "deb https://storage.googleapis.com/gvisor/releases yyyymmdd main"
|
2019-09-12 07:26:09 +00:00
|
|
|
```
|
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
> Note: only newer releases may be available as `apt` repositories.
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
### Point release
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
A given point release is available at the following URL:
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
`https://storage.googleapis.com/gvisor/releases/release/${yyyymmdd}.${rc}`
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
You can use this link with the steps described in
|
|
|
|
[Install latest release](#install-latest).
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-09-18 18:19:04 +00:00
|
|
|
Note that `apt` installation of a specific point release is not supported.
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2020-05-20 23:04:16 +00:00
|
|
|
After installation, try out `runsc` by following the
|
|
|
|
[Docker Quick Start](./quick_start/docker.md) or
|
|
|
|
[OCI Quick Start](./quick_start/oci.md).
|