Update docker build for EL7 52/26752/1
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Wed, 9 Sep 2015 22:50:13 +0000 (15:50 -0700)
committerAndrew Grimberg <agrimberg@linuxfoundation.org>
Wed, 9 Sep 2015 22:50:13 +0000 (15:50 -0700)
Reconfigure the docker build to support either Fedora or EL7 flavors for
creating docker images.

Change-Id: Ic0d7e8b1444c8fd0984e7a88b7be19d5685a711e
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
vagrant/docker/bootstrap.sh

index 3ba1164fc54b6a75cc57b38477eafb56a12ab38f..676fd3d06626ce82e7f1bbec0ae689419c77d0e9 100644 (file)
@@ -2,15 +2,15 @@
 
 # vim: sw=4 ts=4 sts=4 et :
 
-fedora_changes() {
+rh_changes() {
     # make sure we're fully updated
     echo "---> Updating OS"
-    dnf clean all
-    dnf update -y -q
+    yum clean all
+    yum update -y -q
 
     # install docker and enable it
     echo "---> Installing docker"
-    dnf install -y docker supervisor bridge-utils
+    yum install -y docker supervisor bridge-utils
     systemctl enable docker
 
     # configure docker networking so that it does not conflict with LF
@@ -24,13 +24,6 @@ EOL
     groupadd docker
 }
 
-el_changes() {
-    # make sure we're fully updated
-    echo "---> Updating OS"
-    yum clean all
-    yum update -q -y
-}
-
 ubuntu_changes() {
     # make sure we're fully updated
     echo "---> Updating OS"
@@ -40,11 +33,8 @@ ubuntu_changes() {
 
 OS=`/usr/bin/facter operatingsystem`
 case "$OS" in
-    Fedora)
-        fedora_changes
-    ;;
-    Centos|RedHat)
-        el_changes
+    CentOS|Fedora|RedHat)
+        rh_changes
     ;;
     Ubuntu)
         ubuntu_changes