Skip to content

Commit

Permalink
install: make commands copy-pasteable
Browse files Browse the repository at this point in the history
Based on Elan Ruusamäe patch.
Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan authored and vrothberg committed Nov 17, 2020
1 parent 4ad2c75 commit 72e8af5
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions install.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
### Fedora

```sh
$ sudo dnf -y install skopeo
sudo dnf -y install skopeo
```

### RHEL/CentOS ≥ 8 and CentOS Stream

```sh
$ sudo dnf -y install skopeo
sudo dnf -y install skopeo
```

Newer Skopeo releases may be available on the repositories provided by the
Expand All @@ -21,11 +21,11 @@ Kubic project. Beware, these may not be suitable for production environments.
on CentOS 8:

```sh
$ sudo dnf -y module disable container-tools
$ sudo dnf -y install 'dnf-command(copr)'
$ sudo dnf -y copr enable rhcontainerbot/container-selinux
$ sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_8/devel:kubic:libcontainers:stable.repo
$ sudo dnf -y install skopeo
sudo dnf -y module disable container-tools
sudo dnf -y install 'dnf-command(copr)'
sudo dnf -y copr enable rhcontainerbot/container-selinux
sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_8/devel:kubic:libcontainers:stable.repo
sudo dnf -y install skopeo
```

on CentOS 8 Stream:
Expand All @@ -41,33 +41,33 @@ sudo dnf -y install skopeo
### RHEL/CentOS ≤ 7.x

```sh
$ sudo yum -y install skopeo
sudo yum -y install skopeo
```

Newer Skopeo releases may be available on the repositories provided by the
Kubic project. Beware, these may not be suitable for production environments.

```sh
$ sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_7/devel:kubic:libcontainers:stable.repo
$ sudo yum -y install skopeo
sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_7/devel:kubic:libcontainers:stable.repo
sudo yum -y install skopeo
```

### openSUSE

```sh
$ sudo zypper install skopeo
sudo zypper install skopeo
```

### Alpine

```sh
$ sudo apk add skopeo
sudo apk add skopeo
```

### macOS

```sh
$ brew install skopeo
brew install skopeo
```

### Nix / NixOS
Expand All @@ -83,38 +83,38 @@ are available via the [Kubic][0] project repositories:

```bash
# Debian Unstable/Sid:
$ echo 'deb http:https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Unstable/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
$ curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Unstable/Release.key | sudo apt-key add -
echo 'deb http:https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Unstable/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Unstable/Release.key | sudo apt-key add -
```

```bash
# Debian Testing:
$ echo 'deb http:https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Testing/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
$ curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Testing/Release.key | sudo apt-key add -
echo 'deb http:https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Testing/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Testing/Release.key | sudo apt-key add -
```

```bash
# Debian 10:
$ echo 'deb http:https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
$ curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/Release.key | sudo apt-key add -
echo 'deb http:https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/Release.key | sudo apt-key add -
```

```bash
# Raspbian 10:
$ echo 'deb http:https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Raspbian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
$ curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Raspbian_10/Release.key | sudo apt-key add -
echo 'deb http:https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Raspbian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Raspbian_10/Release.key | sudo apt-key add -
```

```bash
# Ubuntu (18.04, 19.04, 19.10 and 20.04):
$ . /etc/os-release
$ sudo sh -c "echo 'deb http:https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
$ curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/Release.key | sudo apt-key add -
. /etc/os-release
sudo sh -c "echo 'deb http:https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/Release.key | sudo apt-key add -
```

```bash
$ sudo apt-get -y update
$ sudo apt-get -y install skopeo
sudo apt-get -y update
sudo apt-get -y install skopeo
```

Otherwise, read on for building and installing it from source:
Expand All @@ -139,29 +139,29 @@ Install the necessary dependencies:

```bash
# Fedora:
$ sudo dnf install gpgme-devel libassuan-devel btrfs-progs-devel device-mapper-devel
sudo dnf install gpgme-devel libassuan-devel btrfs-progs-devel device-mapper-devel
```

```bash
# Ubuntu (`libbtrfs-dev` requires Ubuntu 18.10 and above):
$ sudo apt install libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev
sudo apt install libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev
```

```bash
# macOS:
$ brew install gpgme
brew install gpgme
```

```bash
# openSUSE:
$ sudo zypper install libgpgme-devel device-mapper-devel libbtrfs-devel glib2-devel
sudo zypper install libgpgme-devel device-mapper-devel libbtrfs-devel glib2-devel
```

Make sure to clone this repository in your `GOPATH` - otherwise compilation fails.

```bash
$ git clone https://github.com/containers/skopeo $GOPATH/src/github.com/containers/skopeo
$ cd $GOPATH/src/github.com/containers/skopeo && make bin/skopeo
git clone https://github.com/containers/skopeo $GOPATH/src/github.com/containers/skopeo
cd $GOPATH/src/github.com/containers/skopeo && make bin/skopeo
```

By default the `make` command (make all) will build bin/skopeo and the documentation locally.
Expand All @@ -172,18 +172,18 @@ To build the manual you will need go-md2man.

```bash
# Debian:
$ sudo apt-get install go-md2man
sudo apt-get install go-md2man
```

```
# Fedora:
$ sudo dnf install go-md2man
sudo dnf install go-md2man
```

Then

```bash
$ make docs
make docs
```

### Building in a container
Expand All @@ -204,5 +204,5 @@ $ make binary
Finally, after the binary and documentation is built:

```bash
$ sudo make install
sudo make install
```

0 comments on commit 72e8af5

Please sign in to comment.