2019-11-18 21:40:27 +00:00
|
|
|
---
|
|
|
|
title: "Installation"
|
|
|
|
permalink: /docs/user_guide/install/
|
|
|
|
layout: docs
|
|
|
|
category: User Guide
|
|
|
|
weight: 10
|
|
|
|
---
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2019-11-18 21:40:27 +00:00
|
|
|
{% include required_linux.html %}
|
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:
|
|
|
|
|
|
|
|
`https://storage.googleapis.com/gvisor/releases/master/latest/runsc`
|
|
|
|
|
|
|
|
Checksums for the release binary are at:
|
|
|
|
|
|
|
|
`https://storage.googleapis.com/gvisor/releases/master/latest/runsc.sha512`
|
|
|
|
|
|
|
|
For `apt` installation, use the `master` as the `${DIST}` below.
|
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:
|
|
|
|
|
2019-10-26 00:15:29 +00:00
|
|
|
`https://storage.googleapis.com/gvisor/releases/nightly/latest/runsc`
|
|
|
|
|
|
|
|
Checksums for the release binary are at:
|
|
|
|
|
|
|
|
`https://storage.googleapis.com/gvisor/releases/nightly/latest/runsc.sha512`
|
2019-09-12 07:26:09 +00:00
|
|
|
|
|
|
|
Specific nightly releases can be found at:
|
|
|
|
|
2019-10-26 00:15:29 +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.
|
|
|
|
|
2019-11-05 22:55:06 +00:00
|
|
|
For `apt` installation, use the `nightly` as the `${DIST}` below.
|
2019-09-12 07:26:09 +00:00
|
|
|
|
|
|
|
### Latest release
|
|
|
|
|
|
|
|
The latest official release is available at the following URL:
|
|
|
|
|
|
|
|
`https://storage.googleapis.com/gvisor/releases/release/latest`
|
|
|
|
|
2019-11-05 22:55:06 +00:00
|
|
|
For `apt` installation, use the `release` as the `${DIST}` below.
|
2019-09-12 07:26:09 +00:00
|
|
|
|
|
|
|
### Specific release
|
|
|
|
|
|
|
|
A given release release is available at the following URL:
|
|
|
|
|
|
|
|
`https://storage.googleapis.com/gvisor/releases/release/${yyyymmdd}`
|
|
|
|
|
|
|
|
See the [releases][releases] page for information about specific releases.
|
|
|
|
|
2019-11-05 22:55:06 +00:00
|
|
|
For `apt` installation of a specific release, which may include point updates,
|
|
|
|
use the date of the release, e.g. `${yyyymmdd}`, as the `${DIST}` below.
|
2019-10-24 05:59:45 +00:00
|
|
|
|
2019-11-05 22:55:06 +00:00
|
|
|
> Note: only newer releases may be available as `apt` repositories.
|
2019-10-24 05:59:45 +00:00
|
|
|
|
2019-09-12 07:26:09 +00:00
|
|
|
### Point release
|
|
|
|
|
|
|
|
A given point release is available at the following URL:
|
|
|
|
|
|
|
|
`https://storage.googleapis.com/gvisor/releases/release/${yyyymmdd}.${rc}`
|
|
|
|
|
2019-11-05 22:55:06 +00:00
|
|
|
Note that `apt` installation of a specific point release is not supported.
|
2019-10-24 05:59:45 +00:00
|
|
|
|
2019-11-05 22:55:06 +00:00
|
|
|
## Install from an `apt` repository
|
2019-09-12 07:26:09 +00:00
|
|
|
|
|
|
|
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 key used to sign archives should be added to your `apt` keychain:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
curl -fsSL https://gvisor.dev/archive.key | sudo apt-key add -
|
|
|
|
```
|
|
|
|
|
|
|
|
Based on the release type, you will need to substitute `${DIST}` below, using
|
|
|
|
one of:
|
|
|
|
|
2020-01-17 06:47:38 +00:00
|
|
|
* `master`: For HEAD.
|
2020-01-17 07:13:07 +00:00
|
|
|
* `nightly`: For nightly releases.
|
|
|
|
* `release`: For the latest release.
|
|
|
|
* `${yyyymmdd}`: For a specific releases (see above).
|
2019-09-12 07:26:09 +00:00
|
|
|
|
|
|
|
The repository for the release you wish to install should be added:
|
|
|
|
|
|
|
|
```bash
|
2019-11-05 22:55:06 +00:00
|
|
|
sudo add-apt-repository "deb https://storage.googleapis.com/gvisor/releases ${DIST} main"
|
2019-09-12 07:26:09 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
For example, to install the latest official release, you can use:
|
|
|
|
|
|
|
|
```bash
|
2019-11-05 22:55:06 +00:00
|
|
|
sudo add-apt-repository "deb https://storage.googleapis.com/gvisor/releases release main"
|
2019-09-12 07:26:09 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
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-11-05 22:55:06 +00:00
|
|
|
## Install directly
|
2019-09-12 07:26:09 +00:00
|
|
|
|
2019-11-05 22:55:06 +00:00
|
|
|
The binary URLs provided above can be used to install directly. For example, the
|
|
|
|
latest nightly binary can be downloaded, validated, and placed in an appropriate
|
|
|
|
location by running:
|
2019-09-12 07:26:09 +00:00
|
|
|
|
|
|
|
```bash
|
|
|
|
(
|
|
|
|
set -e
|
2019-10-26 00:15:29 +00:00
|
|
|
URL=https://storage.googleapis.com/gvisor/releases/nightly/latest
|
2019-09-12 07:26:09 +00:00
|
|
|
wget ${URL}/runsc
|
2019-10-18 04:32:14 +00:00
|
|
|
wget ${URL}/runsc.sha512
|
2019-09-12 07:26:09 +00:00
|
|
|
sha512sum -c runsc.sha512
|
2019-10-18 04:32:14 +00:00
|
|
|
rm -f runsc.sha512
|
2019-09-12 07:26:09 +00:00
|
|
|
sudo mv runsc /usr/local/bin
|
|
|
|
sudo chown root:root /usr/local/bin/runsc
|
|
|
|
sudo chmod 0755 /usr/local/bin/runsc
|
|
|
|
)
|
|
|
|
```
|
|
|
|
|
|
|
|
**It is important to copy this binary to a location that is accessible to all
|
|
|
|
users, and ensure it is executable by 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.
|
|
|
|
|
|
|
|
After installation, the`runsc` binary comes with an `install` command that can
|
|
|
|
optionally automatically configure Docker:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
runsc install
|
|
|
|
```
|
|
|
|
|
|
|
|
[releases]: https://github.com/google/gvisor/releases
|