浏览代码

follow best pratices

Bertrand Gouny 9 年之前
父节点
当前提交
45e3e6386c
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      image/Dockerfile

+ 5 - 5
image/Dockerfile

@@ -6,7 +6,7 @@ MAINTAINER Bertrand Gouny <[email protected]>
 # 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 cfssl from baseimage
+# Install OpenLDAP, ldap-utils and cfssl from baseimage and clean apt-get files
 # sources: https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/add-service-available
 #          https://github.com/osixia/docker-light-baseimage/blob/stable/image/service-available/:cfssl/download.sh
 RUN apt-get -y update \
@@ -14,16 +14,16 @@ RUN apt-get -y update \
 	  && LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes --no-install-recommends \
        ldap-utils \
        openssl \
-       slapd
+       slapd \
+    && apt-get clean \
+    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 
 # Add service directory to /container/service
 ADD service /container/service
 
 # Use baseimage install-service script and clean all
 # https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/install-service
-RUN /container/tool/install-service \
-    && apt-get clean \
-    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+RUN /container/tool/install-service
 
 # Add default env variables
 ADD environment /container/environment/99-default