Created
October 11, 2017 15:19
-
-
Save jcvenegas/31253247726c12111495c63321add359 to your computer and use it in GitHub Desktop.
Install latest Clear Containers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
export GOPATH=$(mktemp -p "${PWD}" -d gopath-tmp"$(date +%y%m%d-%H%M)"-XXXX) | |
SHIM=github.com/clearcontainers/shim | |
PROXY=github.com/clearcontainers/proxy | |
RUNTIME=github.com/clearcontainers/runtime | |
AGENT=github.com/clearcontainers/agent | |
OSBUILDER=github.com/clearcontainers/osbuilder | |
LIBEXECDIR=/usr/libexec/clear-containers | |
go get "$SHIM" || true | |
go get -d "$PROXY" | |
go get -d "$RUNTIME" | |
go get -d "$AGENT" | |
go get "$OSBUILDER" || true | |
pushd "$GOPATH/src/$SHIM" | |
./autogen.sh --libexecdir="$LIBEXECDIR" | |
sudo make install | |
popd | |
pushd "$GOPATH/src/$PROXY" | |
make LIBEXECDIR="$LIBEXECDIR" | |
sudo make install | |
popd | |
pushd "$GOPATH/src/$RUNTIME" | |
make PREFIX=/usr \ | |
SYSCONFDIR=/etc \ | |
LOCALSTATEDIR=/var \ | |
SHAREDIR=/usr/share | |
sudo make install \ | |
PREFIX=/usr \ | |
SYSCONFDIR=/etc \ | |
LOCALSTATEDIR=/var \ | |
SHAREDIR=/usr/share \ | |
BASH_COMPLETIONSDIR=/usr/share/bash-completion/completions/cc-runtime \ | |
SCRIPTS_DIR=/usr/bin/ | |
popd | |
pushd "$GOPATH/src/$OSBUILDER" | |
sudo -E make rootfs | |
ROOTFS="${PWD}/workdir/rootfs" | |
[ -d "${ROOTFS}" ] | |
pushd "$GOPATH/src/$AGENT" | |
make | |
sudo make install DESTDIR="${ROOTFS}" | |
popd | |
sudo make image | |
sudo make install-image | |
popd | |
sudo systemctl restart cc-proxy | |
cc-runtime cc-env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment