6

Is it possible to install rkt (app container engine for Linux, in some ways similar to Docker) in Ubuntu? How?

I just want to try it out on Ubuntu itself, without setting up a virtual machine running CoreOS.

6

Update! Official packages now available.

Yeah, this is easy since 1.15 is released officially with Debian/Ubuntu packages.

From https://github.com/coreos/rkt/releases download the .deb package, e.g.:

wget https://github.com/coreos/rkt/releases/download/v1.15.0/rkt_1.15.0-1_amd64.deb
apt install rkt_1.15.0-1_amd64.deb  # for recent Ubuntu with the 'apt' tool

It'll take some time before we can expect "proper" Ubuntu/Debian packaging from a 3rd party repository or even in the official Ubuntu ones.

Old version of the answer

Below is the old version of the answer with a semi-elegant way on getting started with rkt in Ubuntu.

Before you start, make sure you have a recent Ubuntu version running, because rkt requires a recent Systemd version. I believe 15.10+ is fine at the time of writing for v1.10.0.

Below, I'll describe a way to install it using the prebuilt binaries from the rkt releases page and making a package locally.

  1. Install the following packages to prepare.

    sudo apt-get install --no-install-recommends ca-certificates gnupg2 bash-completion checkinstall
    
  2. Create a temporary directory to download the files and build the package in.

    mkdir rkt-builddir && cd rkt-builddir
    
  3. Download the script to build the package. I adjusted the original install-rkt.sh from the release to not use root privileges to build the package. I might make a pull request with my improvements. Available here: https://gist.github.com/gertvdijk/e7ff8e4fe8687ba39a5d0051b6ba0c14

    wget -q https://gist.github.com/gertvdijk/e7ff8e4fe8687ba39a5d0051b6ba0c14/raw/a03f36cc57dd80fd7c31521addb51221bac0ecbf/install-rkt.sh
    
  4. You might want to take a look at what you just downloaded before you proceed to the next steps to run it.

  5. Run the script; make it executable first.

    chmod +x install-rkt.sh
    ./install-rkt.sh
    
  6. It should result in the output like this:

    Done. The new package has been saved to

    /tmp/tmp.AOsyuTDxN7/rkt_1.10.0-1_amd64.deb

    You can install it in your system anytime using: [...]

  7. Install it with the full path (adjust to output you see on your screen):

    sudo dpkg -i /tmp/tmp.AOsyuTDxN7/rkt_1.10.0-1_amd64.deb
    

Two major benefits over installation from source:

  • You can archive the binary package to install on other systems with the same Ubuntu distribution. There, the only thing you need to do is installing the final package from the last step.

  • To remove the package, you can use your package management.

    sudo apt-get remove rkt
    
| improve this answer | |
  • "apt install" is wrong way for install deb package, need use dpkg -i. Leastwise for my version apt 1.2.20. – ComBin May 17 '17 at 8:58
0

It doesn't look like it, but here's a way to make the VM creation quite a lot easier:

I this link they describe a way to do it using vagrant. I'm not sure if that fits what you need, but vagrant is a pretty good tool to learn these days and will likely be far easier than spinning up the VM from scratch.

Sorry it's not what you're looking for, but hopefully it makes the process easier.

| improve this answer | |
0

The CoreOS docs have a simple approach that includes verifying the gpg signature of the package:

gpg --recv-key 18AD5014C99EF7E3BA5F6CE950BDD3E0FC8A365E
wget https://github.com/rkt/rkt/releases/download/v1.29.0/rkt_1.29.0-1_amd64.deb
wget https://github.com/rkt/rkt/releases/download/v1.29.0/rkt_1.29.0-1_amd64.deb.asc
gpg --verify rkt_1.29.0-1_amd64.deb.asc
sudo dpkg -i rkt_1.29.0-1_amd64.deb
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.