From fa5223dab5b9f5cef2a0a341ee5065fec9c6d663 Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Tue, 8 Apr 2014 11:59:02 -0700 Subject: [PATCH] Added Fedora installation method Docker-DCO-1.1-Signed-off-by: James Turnbull (github: jamtur01) --- hack/install.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/hack/install.sh b/hack/install.sh index 205b57ecc..575f32829 100755 --- a/hack/install.sh +++ b/hack/install.sh @@ -72,8 +72,35 @@ fi if [ -z "$lsb_dist" ] && [ -r /etc/debian_version ]; then lsb_dist='Debian' fi +if [ -z "$lsb_dist" ] && [ -r /etc/fedora-release ]; then + lsb_dist='Fedora' +fi case "$lsb_dist" in + Fedora) + ( + set -x + $sh_c 'sleep 3; yum -y -q install docker-io' + ) + if command_exists docker && [ -e /var/run/docker.sock ]; then + ( + set -x + $sh_c 'docker run busybox echo "Docker has been successfully installed!"' + ) || true + fi + your_user=your-user + [ "$user" != 'root' ] && your_user="$user" + echo + echo 'If you would like to use Docker as a non-root user, you should now consider' + echo 'adding your user to the "docker" group with something like:' + echo + echo ' sudo usermod -aG docker' $your_user + echo + echo 'Remember that you will have to log out and back in for this to take effect!' + echo + exit 0 + ;; + Ubuntu|Debian) export DEBIAN_FRONTEND=noninteractive