You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wi...@apache.org on 2019/10/14 17:20:04 UTC

[couchdb-docker] 01/01: Use UBI 8

This is an automated email from the ASF dual-hosted git repository.

willholley pushed a commit to branch ubi8
in repository https://gitbox.apache.org/repos/asf/couchdb-docker.git

commit 53257be0b8f6ca21d41f35cdb7f4e145e7990fb7
Author: Will Holley <wi...@gmail.com>
AuthorDate: Mon Oct 14 16:15:48 2019 +0100

    Use UBI 8
    
    Updates the UBI Dockerfile to use UBI 8 / minimal.
---
 {2.3.1-ubi7 => 2.3.1-ubi8}/Dockerfile              | 37 +++++++++-------------
 .../bintray-apache-couchdb-rpm.repo                |  2 +-
 {2.3.1-ubi7 => 2.3.1-ubi8}/imeyer_runit.repo       |  0
 {2.3.1-ubi7 => 2.3.1-ubi8}/licenses/LICENSE        |  0
 .../resources/10-docker-default.ini                |  0
 .../resources/docker-entrypoint.sh                 |  0
 {2.3.1-ubi7 => 2.3.1-ubi8}/resources/run           |  0
 {2.3.1-ubi7 => 2.3.1-ubi8}/resources/vm.args       |  0
 8 files changed, 16 insertions(+), 23 deletions(-)

diff --git a/2.3.1-ubi7/Dockerfile b/2.3.1-ubi8/Dockerfile
similarity index 80%
rename from 2.3.1-ubi7/Dockerfile
rename to 2.3.1-ubi8/Dockerfile
index 0813f7b..86d73cc 100644
--- a/2.3.1-ubi7/Dockerfile
+++ b/2.3.1-ubi8/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 @@ LABEL maintainer="CouchDB Developers dev@couchdb.apache.org" \
       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 @@ ENV COUCHDB_VERSION 2.3.1
 # 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 @@ RUN set -ex; \
 
 # 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-ubi8/bintray-apache-couchdb-rpm.repo
similarity index 63%
rename from 2.3.1-ubi7/bintray-apache-couchdb-rpm.repo
rename to 2.3.1-ubi8/bintray-apache-couchdb-rpm.repo
index 18bb9c2..e131b6a 100644
--- a/2.3.1-ubi7/bintray-apache-couchdb-rpm.repo
+++ b/2.3.1-ubi8/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-ubi8/imeyer_runit.repo
similarity index 100%
rename from 2.3.1-ubi7/imeyer_runit.repo
rename to 2.3.1-ubi8/imeyer_runit.repo
diff --git a/2.3.1-ubi7/licenses/LICENSE b/2.3.1-ubi8/licenses/LICENSE
similarity index 100%
rename from 2.3.1-ubi7/licenses/LICENSE
rename to 2.3.1-ubi8/licenses/LICENSE
diff --git a/2.3.1-ubi7/resources/10-docker-default.ini b/2.3.1-ubi8/resources/10-docker-default.ini
similarity index 100%
rename from 2.3.1-ubi7/resources/10-docker-default.ini
rename to 2.3.1-ubi8/resources/10-docker-default.ini
diff --git a/2.3.1-ubi7/resources/docker-entrypoint.sh b/2.3.1-ubi8/resources/docker-entrypoint.sh
similarity index 100%
rename from 2.3.1-ubi7/resources/docker-entrypoint.sh
rename to 2.3.1-ubi8/resources/docker-entrypoint.sh
diff --git a/2.3.1-ubi7/resources/run b/2.3.1-ubi8/resources/run
similarity index 100%
rename from 2.3.1-ubi7/resources/run
rename to 2.3.1-ubi8/resources/run
diff --git a/2.3.1-ubi7/resources/vm.args b/2.3.1-ubi8/resources/vm.args
similarity index 100%
rename from 2.3.1-ubi7/resources/vm.args
rename to 2.3.1-ubi8/resources/vm.args