|
|
@@ -1,23 +1,36 @@
|
|
|
FROM osixia/light-baseimage:0.1.0
|
|
|
MAINTAINER Bertrand Gouny <[email protected]>
|
|
|
|
|
|
-# Use baseimage-docker's init system.
|
|
|
+# Use osixia/light-baseimage's init system.
|
|
|
CMD ["/osixia/tool/run"]
|
|
|
|
|
|
-# Add openldap user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
|
|
|
-RUN groupadd -r openldap && useradd -r -g openldap openldap
|
|
|
-
|
|
|
-# Install OpenLDAP, ldap-utils and ssl-helper from baseimage, remove default ldap db
|
|
|
-RUN apt-get -y update && /sbin/add-service-available ssl-helper-gnutls \
|
|
|
- && LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes --no-install-recommends \
|
|
|
- slapd ldap-utils \
|
|
|
- && rm -rf /var/lib/ldap /etc/ldap/slapd.d
|
|
|
-
|
|
|
# Add service directory to /osixia/service
|
|
|
ADD service /osixia/service
|
|
|
|
|
|
-# Use baseimage install-service script and clean all
|
|
|
-RUN ./sbin/install-service && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
+# Scripts /sbin/add-service-available
|
|
|
+# /sbin/install-service and /sbin/clean-container
|
|
|
+# are tools from osixia/light-baseimage
|
|
|
+RUN /sbin/add-service-available ssl-helper-gnutls \
|
|
|
+ && /sbin/install-service \
|
|
|
+ && /sbin/clean-container
|
|
|
+
|
|
|
+# /sbin/add-service-available ssl-helper-gnutls
|
|
|
+# Add ssl-helper-gnutls, used to generate TLS default certificates
|
|
|
+
|
|
|
+# /sbin/install-service
|
|
|
+# make an apt-get update
|
|
|
+# run /osixia/service/*/install.sh
|
|
|
+# link /osixia/service/*/container-start.sh to /etc/my_init.d/*
|
|
|
+# link /osixia/service/*/daemon.sh to /etc/service/*/run
|
|
|
+
|
|
|
+# Files in /etc/my_init.d will be run during container start,
|
|
|
+# Files in /etc/service/*/run are the process run by the docker image
|
|
|
+
|
|
|
+# /sbin/clean-container remove unnecessary files
|
|
|
+
|
|
|
+# More information :
|
|
|
+# https://github.com/osixia/docker-light-baseimage
|
|
|
+
|
|
|
|
|
|
# Add default env variables
|
|
|
ADD env.yaml /etc/env.yaml
|