Last active
March 25, 2018 12:19
-
-
Save TsutomuNakamura/36920d251c81ec6638f7 to your computer and use it in GitHub Desktop.
Ubuntu にリポジトリから最新のDocker をインストールする
This file contains hidden or 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 -eu | |
# Reference https://docs.docker.com/engine/installation/ubuntulinux/ | |
[ "$(id -u)" != "0" ] && echo "You must run this script as root." && exit 1 | |
. /etc/os-release | |
[ "${NAME,,}" != "ubuntu" ] && echo "Sorry, this script doesn't support the distribution $NAME" && exit 1 | |
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
. /etc/lsb-release | |
echo "deb https://apt.dockerproject.org/repo ubuntu-${DISTRIB_CODENAME,,} main" > /etc/apt/sources.list.d/docker.list | |
apt-get update | |
apt-get -y purge lxc-docker || true | |
sudo apt-get -y install linux-image-extra-$(uname -r) docker-engine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment