From 05f2014086cb637675656877db44af359b2bd1a8 Mon Sep 17 00:00:00 2001
From: vharseko <vharseko@openam.org.ru>
Date: Wed, 04 Jul 2018 19:50:16 +0000
Subject: [PATCH] Merge pull request #11 from HarlemSquirrel/docker-alpine

---
 opendj-packages/opendj-docker/alpine/Dockerfile |   32 ++++++++++++++++++++++++++++++++
 opendj-packages/opendj-docker/Dockerfile        |   11 +++++++++--
 2 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/opendj-packages/opendj-docker/Dockerfile b/opendj-packages/opendj-docker/Dockerfile
index c8ddcf4..a9987e2 100644
--- a/opendj-packages/opendj-docker/Dockerfile
+++ b/opendj-packages/opendj-docker/Dockerfile
@@ -2,6 +2,8 @@
 
 MAINTAINER Open Identity Platform Community <open-identity-platform-opendj@googlegroups.com>
 
+ARG ADD_BASE_ENTRY="--addBaseEntry"
+
 ARG PORT=1389
 
 ARG LDAPS_PORT=1636
@@ -18,8 +20,13 @@
 
 RUN apt-get install -y wget unzip
 
-RUN wget --quiet https://github.com/OpenIdentityPlatform/OpenDJ/releases/download/$VERSION/opendj-$VERSION.zip && unzip opendj-$VERSION.zip && rm -r opendj-$VERSION.zip
+RUN wget --quiet \
+  https://github.com/OpenIdentityPlatform/OpenDJ/releases/download/$VERSION/opendj-$VERSION.zip && \
+  unzip opendj-$VERSION.zip && \
+  rm -r opendj-$VERSION.zip
 
-RUN /opt/opendj/setup --cli -p $PORT --ldapsPort $LDAPS_PORT --enableStartTLS --generateSelfSignedCertificate --baseDN "$BASE_DN" -h localhost --rootUserDN "$ROOT_USER_DN" --rootUserPassword $ROOT_PASSWORD --acceptLicense --no-prompt --doNotStart
+RUN /opt/opendj/setup --cli -p $PORT --ldapsPort $LDAPS_PORT --enableStartTLS \
+  --generateSelfSignedCertificate --baseDN "$BASE_DN" -h localhost --rootUserDN "$ROOT_USER_DN" \
+  --rootUserPassword "$ROOT_PASSWORD" --acceptLicense --no-prompt --doNotStart $ADD_BASE_ENTRY
 
 CMD ["/opt/opendj/bin/start-ds", "--nodetach"]
diff --git a/opendj-packages/opendj-docker/alpine/Dockerfile b/opendj-packages/opendj-docker/alpine/Dockerfile
new file mode 100644
index 0000000..08ef2cd
--- /dev/null
+++ b/opendj-packages/opendj-docker/alpine/Dockerfile
@@ -0,0 +1,32 @@
+FROM java:8-alpine
+
+MAINTAINER Open Identity Platform Community <open-identity-platform-opendj@googlegroups.com>
+
+ARG ADD_BASE_ENTRY="--addBaseEntry"
+
+ARG PORT=1389
+
+ARG LDAPS_PORT=1636
+
+ARG BASE_DN="dc=example,dc=com"
+
+ARG ROOT_USER_DN="cn=Directory Manager"
+
+ARG ROOT_PASSWORD=password
+
+ARG VERSION=@project_version@
+
+WORKDIR /opt
+
+RUN apk add --update wget unzip
+
+RUN wget --quiet \
+  https://github.com/OpenIdentityPlatform/OpenDJ/releases/download/$VERSION/opendj-$VERSION.zip && \
+  unzip opendj-$VERSION.zip && \
+  rm -r opendj-$VERSION.zip
+
+RUN /opt/opendj/setup --cli -p $PORT --ldapsPort $LDAPS_PORT --enableStartTLS \
+  --generateSelfSignedCertificate --baseDN "$BASE_DN" -h localhost --rootUserDN "$ROOT_USER_DN" \
+  --rootUserPassword "$ROOT_PASSWORD" --acceptLicense --no-prompt --doNotStart $ADD_BASE_ENTRY
+
+CMD ["/opt/opendj/bin/start-ds", "--nodetach"]

--
Gitblit v1.10.0