Use UBI 8 (#158)

Updates the UBI Dockerfile to use UBI 8 / minimal. At the same time,
remove the version suffix from the UBI image folder.
diff --git a/.travis.yml b/.travis.yml
index 7eb7028..18aa8c5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,7 +13,7 @@
 env:
   - RELEASES=2.3.0
   - RELEASES=2.3.1
-  - RELEASES=2.3.1-ubi7
+  - RELEASES=2.3.1-ubi
   - RELEASES=dev
   - RELEASES=dev-cluster
 
diff --git a/2.3.1-ubi7/Dockerfile b/2.3.1-ubi/Dockerfile
similarity index 80%
rename from 2.3.1-ubi7/Dockerfile
rename to 2.3.1-ubi/Dockerfile
index 0813f7b..86d73cc 100644
--- a/2.3.1-ubi7/Dockerfile
+++ b/2.3.1-ubi/Dockerfile
@@ -10,7 +10,7 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-FROM registry.access.redhat.com/ubi7/ubi
+FROM registry.access.redhat.com/ubi8/ubi-minimal
 
 ARG RELEASE
 ARG BUILD_DATE
@@ -25,7 +25,7 @@
       build-date=${BUILD_DATE} \
       io.k8s.display-name="Apache CouchDB" \
       io.k8s.description="Red Hat OpenShift-compatible container that runs Apache CouchDB" \
-      io.openshift.tags="database couchdb apache rhel7" \
+      io.openshift.tags="database couchdb apache rhel8" \
       io.openshift.expose-services="5984/http,4369/epmd,9100/erlang" \
       io.openshift.min-memory="1Gi" \
       io.openshift.min-cpu="1"
@@ -38,28 +38,21 @@
 # Add CouchDB user account to make sure the IDs are assigned consistently
 # CouchDB user added to root group for OpenShift support
 RUN set -ex; \
-    useradd -u 5984 -d /opt/couchdb -g root couchdb; \
 # be sure GPG and apt-transport-https are available and functional
-    yum update --disableplugin=subscription-manager -y && rm -rf /var/cache/yum; \
-    yum install -y \
+    microdnf update --disableplugin=subscription-manager -y && rm -rf /var/cache/yum; \
+    microdnf install -y \
             ca-certificates \
             gnupg \
-            pygpgme; \
-# install wget
-    yum update --disableplugin=subscription-manager -y && rm -rf /var/cache/yum; \
-    yum history new; \
-    yum install -y wget; \
-# Enable EPEL repositories (needed for python-progressbar dependency)
-    wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm; \
-# Remove wget
-    yum -y history undo 1; \
-    yum install -y epel-release-latest-7.noarch.rpm; \
-    rm epel-release-latest-7.noarch.rpm; \
+            findutils \
+            shadow-utils; \
+# Add CouchDB User and Group (group required by rpm)
+    useradd -u 5984 -d /opt/couchdb -g root couchdb; \
+    groupadd -g 5984 couchdb; \
 # Install runit
-     yum update --disableplugin=subscription-manager -y && rm -rf /var/cache/yum; \
-     yum install --enablerepo=imeyer_runit -y runit; \
+    microdnf update --disableplugin=subscription-manager -y && rm -rf /var/cache/yum; \
+    microdnf install --enablerepo=imeyer_runit -y runit; \
 # Clean up
-    yum clean all; \
+    microdnf clean all; \
     rm -rf /var/cache/yum
 
 # https://docs.couchdb.org/en/stable/install/unix.html
@@ -82,9 +75,9 @@
 
 # Install CouchDB
 RUN set -xe; \
-    yum update --disableplugin=subscription-manager -y && rm -rf /var/cache/yum; \
-    yum install --enablerepo=bintray-apache-couchdb-rpm -y couchdb; \
-    yum clean all; \
+    microdnf update --disableplugin=subscription-manager -y && rm -rf /var/cache/yum; \
+    microdnf install --enablerepo=bintray-apache-couchdb-rpm -y couchdb; \
+    microdnf clean all; \
     rm -rf /var/cache/yum; \
 # remove defaults that force writing logs to file
     rm /opt/couchdb/etc/default.d/10-filelog.ini; \
diff --git a/2.3.1-ubi7/bintray-apache-couchdb-rpm.repo b/2.3.1-ubi/bintray-apache-couchdb-rpm.repo
similarity index 63%
rename from 2.3.1-ubi7/bintray-apache-couchdb-rpm.repo
rename to 2.3.1-ubi/bintray-apache-couchdb-rpm.repo
index 18bb9c2..e131b6a 100644
--- a/2.3.1-ubi7/bintray-apache-couchdb-rpm.repo
+++ b/2.3.1-ubi/bintray-apache-couchdb-rpm.repo
@@ -1,6 +1,6 @@
 [bintray-apache-couchdb-rpm]
 name=bintray--apache-couchdb-rpm
-baseurl=http://apache.bintray.com/couchdb-rpm/el7/x86_64
+baseurl=http://apache.bintray.com/couchdb-rpm/el8/x86_64
 gpgcheck=0
 repo_gpgcheck=0
 enabled=1
diff --git a/2.3.1-ubi7/imeyer_runit.repo b/2.3.1-ubi/imeyer_runit.repo
similarity index 100%
rename from 2.3.1-ubi7/imeyer_runit.repo
rename to 2.3.1-ubi/imeyer_runit.repo
diff --git a/2.3.1-ubi7/licenses/LICENSE b/2.3.1-ubi/licenses/LICENSE
similarity index 100%
rename from 2.3.1-ubi7/licenses/LICENSE
rename to 2.3.1-ubi/licenses/LICENSE
diff --git a/2.3.1-ubi7/resources/10-docker-default.ini b/2.3.1-ubi/resources/10-docker-default.ini
similarity index 100%
rename from 2.3.1-ubi7/resources/10-docker-default.ini
rename to 2.3.1-ubi/resources/10-docker-default.ini
diff --git a/2.3.1-ubi7/resources/docker-entrypoint.sh b/2.3.1-ubi/resources/docker-entrypoint.sh
similarity index 100%
rename from 2.3.1-ubi7/resources/docker-entrypoint.sh
rename to 2.3.1-ubi/resources/docker-entrypoint.sh
diff --git a/2.3.1-ubi7/resources/run b/2.3.1-ubi/resources/run
similarity index 100%
rename from 2.3.1-ubi7/resources/run
rename to 2.3.1-ubi/resources/run
diff --git a/2.3.1-ubi7/resources/vm.args b/2.3.1-ubi/resources/vm.args
similarity index 100%
rename from 2.3.1-ubi7/resources/vm.args
rename to 2.3.1-ubi/resources/vm.args