Compile cri-o 1.16.x on CentOS 7.x

Jbn1233
1 min readJun 8, 2020

--

For some reasons, I have to stuck with CentOS 7.x and there’s no RPM file for this. Since Red hat have skipped Kubernetes 1.16 and used 1.17 on the latest version of Open shift.

export http_proxy=http://proxy.home.net:80
export https_proxy=http://proxy.home.net:80
yum -y update
yum -y group install "Development Tools"
yum -y install wget conntrack-tools iptables-services net-tools jq btrfs-progs-devel \
container-selinux device-mapper-devel gcc git glib2-devel glibc-devel glibc-static \
gpgme-devel json-glib-devel libassuan-devel libgpg-error-devel libseccomp-devel make \
pkgconfig skopeo-containers tar wget golang-github-cpuguy83-go-md2man which
mkdir -p /data/src
git clone https://github.com/cri-o/cri-o /data/src/github.com/cri-o/cri-o
git clone https://github.com/opencontainers/runc /data/src/github.com/opencontainers/runc
git clone http://github.com/containers/conmon /data/src/github.com/conmon
cd /data
wget https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz
tar xf go1.14.4.linux-amd64.tar.gz
export PATH=$PATH:/data/go/bin
go --version
cd /data/src/github.com/cri-o/cri-o
*** git checkout tags/v1.16.6
make BUILDTAGS="seccomp selinux"
make install

Next, conmon

cd /data/src/github.com/conmon
*** git checkout tags/v2.0.17
make BUILDTAGS="seccomp selinux"
make install

Finally, runc

cd /data/src/github.com/opencontainers/runc
*** git checkout tags/v1.0.0-rc90
export GOPATH=/data
make BUILDTAGS="seccomp selinux"
make install

*** tags version may vary.

Done.

--

--

Jbn1233
Jbn1233

Written by Jbn1233

Very short and simple notes for CKA/SRE and may not works on your environment | jbn1233@gmail.com | Bangkok, Thailand |

No responses yet