Last active
April 30, 2018 14:46
-
-
Save pyaillet/524b493e682f9d0e1b125c75f0197d2f to your computer and use it in GitHub Desktop.
Installing clearcontainers on a VM
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/sh | |
# install docker | |
sudo -E apt-get -y install apt-transport-https ca-certificates wget software-properties-common | |
wget -qO - https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo -E add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo -E apt-get update | |
sudo -E apt-get -y install docker-ce | |
# install clear containers | |
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/clearcontainers:/clear-containers-3/xUbuntu_$(lsb_release -rs)/ /' >> /etc/apt/sources.list.d/clear-containers.list" | |
wget -qO - http://download.opensuse.org/repositories/home:/clearcontainers:/clear-containers-3/xUbuntu_$(lsb_release -rs)/Release.key | sudo apt-key add - | |
sudo -E apt-get update | |
sudo -E apt-get -y install cc-runtime cc-proxy cc-shim | |
# configure docker to use clear-containers | |
sudo mkdir -p /etc/systemd/system/docker.service.d/ | |
cat <<EOF | sudo tee /etc/systemd/system/docker.service.d/clear-containers.conf | |
[Service] | |
ExecStart= | |
ExecStart=/usr/bin/dockerd -D --add-runtime cc-runtime=/usr/bin/cc-runtime --default-runtime=cc-runtime | |
EOF | |
# Restart docker | |
sudo systemctl daemon-reload | |
sudo systemctl enable docker.service | |
sudo systemctl restart docker | |
# Launch clear container | |
sudo docker run -ti busybox sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment