This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.1 by this push:
new 6200037 Issue 50439 - Update docker integration for Fedora
6200037 is described below
commit 6200037e876bc33d0311cff49d3588602330eb5e
Author: Matus Honek <mhonek(a)redhat.com>
AuthorDate: Tue Nov 19 19:40:32 2019 +0100
Issue 50439 - Update docker integration for Fedora
Bug Description:
Fedora Dockerfile has been unbuildable/broken for sometime.
Fix Description:
Update the Dockerfile to make it work while mimicking ideas from the
SUSE's counterpart.
Additionaly, changing wget to curl in rpm.mk since wget does not seem to
be available in the minimal image.
Relates
https://pagure.io/389-ds-base/issue/50439
Relates
https://pagure.io/389-ds-base/pull-request/50441#comment-88961
Author: Matus Honek <mhonek(a)redhat.com>
Review by: firstyear, vashirov (thanks!)
---
docker.mk | 3 ++
docker/389-ds-fedora/Dockerfile | 63 ++++++++++++++++++++++-------------------
rpm.mk | 2 +-
3 files changed, 38 insertions(+), 30 deletions(-)
diff --git a/docker.mk b/docker.mk
index 4f07cec..0f42b0b 100644
--- a/docker.mk
+++ b/docker.mk
@@ -1,3 +1,6 @@
suse:
docker build -t 389-ds-suse:master -f docker/389-ds-suse/Dockerfile .
+
+fedora:
+ docker build -t 389-ds-fedora:master -f docker/389-ds-fedora/Dockerfile .
diff --git a/docker/389-ds-fedora/Dockerfile b/docker/389-ds-fedora/Dockerfile
index d61df8c..ba901e1 100644
--- a/docker/389-ds-fedora/Dockerfile
+++ b/docker/389-ds-fedora/Dockerfile
@@ -6,41 +6,46 @@
# See LICENSE for details.
# --- END COPYRIGHT BLOCK ---
-FROM fedora:26
+FROM fedora:latest
MAINTAINER 389-devel(a)lists.fedoraproject.org
-EXPOSE 389 636
-ENV container docker
-
-RUN mkdir -p /usr/local/src
-WORKDIR /usr/local/src
+EXPOSE 3389 3636
ADD ./ /usr/local/src/389-ds-base
-
-RUN dnf upgrade -y && \
- dnf install --setopt=strict=False -y \
- @buildsys-build rpm-build make bzip2 git rsync \
- `grep -E "^(Build)?Requires" 389-ds-base/rpm/389-ds-base.spec.in | grep
-v -E '(name|MODULE)' | awk '{ print $2 }' | sed
's/%{python3_pkgversion}/3/g' | grep -v "^/" | grep -v pkgversion | sort
| uniq | tr '\n' ' '` && \
+WORKDIR /usr/local/src/389-ds-base
+
+# install dependencies
+RUN dnf upgrade -y \
+ && dnf install --setopt=strict=False -y @buildsys-build rpm-build make bzip2
git rsync \
+ `grep -E "^(Build)?Requires" rpm/389-ds-base.spec.in \
+ | grep -v -E '(name|MODULE)' \
+ | awk '{ print $2 }' \
+ | sed 's/%{python3_pkgversion}/3/g' \
+ | grep -v "^/" \
+ | grep -v pkgversion \
+ | sort | uniq \
+ | tr '\n' ' '` \
+ && dnf clean all
+
+# build
+RUN make -f rpm.mk rpms || sh -c 'echo "build failed, sleeping for some time to
allow you debug" ; sleep 3600'
+
+RUN dnf install -y dist/rpms/*389*.rpm && \
dnf clean all
+# Link some known static locations to point to /data
+RUN mkdir -p /data/config && \
+ mkdir -p /data/ssca && \
+ mkdir -p /data/run && \
+ mkdir -p /var/run/dirsrv && \
+ ln -s /data/config /etc/dirsrv/slapd-localhost && \
+ ln -s /data/ssca /etc/dirsrv/ssca && \
+ ln -s /data/run /var/run/dirsrv
-### CHANGE THIS TO A ./configure and build that way.
-
-RUN cd 389-ds-base && \
- PERL_ON=0 RUST_ON=1 make -f rpm.mk rpms
-
-RUN dnf install -y 389-ds-base/dist/rpms/*389*.rpm && \
- dnf clean all
-
-# Create the example setup inf. It's valid for containers!
-# Build the instance from the new installer tools.
-RUN /usr/sbin/dscreate create-template > /root/ds-setup.inf &&
/usr/sbin/dscreate -v from-file /root/ds-setup.inf --containerised
+VOLUME /data
-# Finally add the volumes, they will inherit the contents of these directories.
-VOLUME /etc/dirsrv
-VOLUME /var/log/dirsrv
-VOLUME /var/lib/dirsrv
+#USER dirsrv
-# Or, run them as dirsrv
-USER dirsrv
-CMD ["/usr/sbin/ns-slapd", "-d", "0", "-D",
"/etc/dirsrv/slapd-localhost", "-i",
"/var/run/dirsrv/slapd-localhost.pid"]
+HEALTHCHECK --start-period=5m --timeout=5s --interval=5s --retries=2 \
+ CMD /usr/sbin/dscontainer -H
+CMD [ "/usr/sbin/dscontainer", "-r" ]
diff --git a/rpm.mk b/rpm.mk
index 1b2d02e..28275f1 100644
--- a/rpm.mk
+++ b/rpm.mk
@@ -63,7 +63,7 @@ tarballs: local-archive
rm -rf dist/$(NAME_VERSION)
cd dist/sources ; \
if [ $(BUNDLE_JEMALLOC) -eq 1 ]; then \
- wget $(JEMALLOC_URL) ; \
+ curl -LO $(JEMALLOC_URL) ; \
fi
rpmroot:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.