Lately I’ve been encountering some errors that, after some research, I discovered that the resolution was to upgrade my runc
version. Since searching for upgrade runc did not yield any results I’ve decided to write this quick guide.
First verify your current runc
version:
$ runc --version
Mine was:
runc version 1.0.0-rc10
commit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
spec: 1.0.1-dev
How to upgrade?
Generally you have two options:
- Use the official
runc
releases binary file, found here. - Build
runc
from the source code, which is the procedure I’ll cover in this post.
The instructions might change over time, so the official ones can be found here. I’ll list down the steps I took.
Building and upgrading runc from source code
runc
currently supports the Linux platform with various architecture support. It must be built with Go version 1.13 or higher.
In order to enable seccomp support you will need to install libseccomp
on your platform. On Ubuntu this can be done with:
$ sudo apt-get update -y
$ sudo apt-get install -y libseccomp-dev
Navigate to your $GOPATH/src
directory:
$ cd $GOPATH/src
Create the following directory:
$ mkdir github.com/opencontainers
And run these commands:
$ cd github.com/opencontainers
$ git clone https://github.com/opencontainers/runc
$ cd runc
$ make
$ sudo make install
runc
will be installed to /usr/local/sbin/runc
on your system.
Notes:
- If you encounter errors on the
sudo make install
command then it most likely since you are missing some packages. The output command should include the missing package name, simply install the missing package withapt-get install
.
Validate your runc
version:
$ runc --version
runc version 1.0.0-rc92+dev
commit: 636f23dd21bda3a7d54c134f7612e9a25522e5f5
spec: 1.0.2-dev
go: go1.14.6
libseccomp: 2.4.3
I hope this simple guide helped you guys!
That’s all for now. Feel free to follow me on twitter for regular updates and as usual – like and comment at will. See you on the next one!