diff --git a/Dockerfile b/Dockerfile index fbcca1a..ff9eff6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ # webcenter/rancher-alfresco -FROM quay.io/webcenter/rancher-base-image:latest +FROM ubuntu:16.04 MAINTAINER Sebastien LANGOUREAUX (linuxworkgroup@hotmail.com) #Alfresco version -ENV ALF_URL=http://dl.alfresco.com/release/community/201605-build-00010/alfresco-community-installer-201605-linux-x64.bin +ENV ALF_URL=http://dl.alfresco.com/release/community/201612-build-00014/alfresco-community-installer-201612-linux-x64.bin ENV ALF_HOME=/opt/alfresco diff --git a/README.md b/README.md index 93e3e8f..0706048 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ docker pull webcenter/rancher-alfresco:latest or pull a particular version: ```bash -docker pull webcenter/rancher-alfresco:5.1-201605-1 +docker pull webcenter/rancher-alfresco:5.2-201612GA ``` Alternatively, you can build the image yourself: @@ -125,7 +125,7 @@ docker run -d --name "alfresco" \ --link postgres:db \ -p 7070:7070 -p 8080:8080 \ -v /host/alfresco_data=/opt/alfresco/alf_data \ - webcenter/rancher-alfresco:5.1-201605-1 + webcenter/rancher-alfresco:5.2-201612GA ``` ## Reverse Proxy @@ -137,7 +137,7 @@ docker run -d --name "alfresco" \ --link postgres:db \ -p 7070:7070 -p 8080:8080 \ -v /host/alfresco_data=/opt/alfresco/alf_data \ - webcenter/rancher-alfresco:5.1-201605-1 + webcenter/rancher-alfresco:5.2-201612GA ``` ## Mail setting @@ -153,7 +153,7 @@ docker run -d --name "alfresco" \ -p 7070:7070 -p 8080:8080 \ --link postgres:db \ -v /host/alfresco_data=/opt/alfresco/alf_data \ - webcenter/rancher-alfresco:5.1-201605-1 + webcenter/rancher-alfresco:5.2-201612GA ``` ## FTP setting @@ -166,7 +166,7 @@ docker run -d --name "alfresco" \ -p 21:21 -p 7070:7070 -p 8080:8080 \ --link postgres:db \ -v /host/alfresco_data=/opt/alfresco/alf_data \ - webcenter/rancher-alfresco:5.1-201605-1 + webcenter/rancher-alfresco:5.2-201612GA ``` ## CIFS To access on alfresco as a Windows share, you must setting CIFS : @@ -179,7 +179,7 @@ docker run -d --name "alfresco" \ --link postgres:db \ -p 445:445 -p 7070:7070 -p 8080:8080 \ -v /host/alfresco_data=/opt/alfresco/alf_data \ - webcenter/rancher-alfresco:5.1-201605-1 + webcenter/rancher-alfresco:5.2-201612GA ``` ## LDAP authentification @@ -198,7 +198,7 @@ docker run -d --name "alfresco" \ -p 445:445 -p 7070:7070 -p 8080:8080 \ --link postgres:db \ -v /host/alfresco_data=/opt/alfresco/alf_data \ - webcenter/rancher-alfresco:5.1-201605-1 + webcenter/rancher-alfresco:5.2-201612GA ``` ## VTI external access @@ -212,7 +212,7 @@ docker run -d --name "alfresco" \ --link postgres:db \ -p 445:445 -p 7070:7070 -p 8080:8080 \ -v /host/alfresco_data=/opt/alfresco/alf_data \ - webcenter/rancher-alfresco:5.1-201605-1 + webcenter/rancher-alfresco:5.2-201612GA ``` diff --git a/assets/init.py b/assets/init.py index efdeba7..704ec66 100644 --- a/assets/init.py +++ b/assets/init.py @@ -137,7 +137,7 @@ def set_mail(self, host, port, user, password, protocol, starttls_enable, mail_s if user is not None and user != "": if password is None or password == "": raise KeyError("You must provide password") - self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco-global.properties', '^#.mail.username\s*=.*', 'mail.username=' + username) + self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco-global.properties', '^#.mail.username\s*=.*', 'mail.username=' + user) self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco-global.properties', '^#.mail.password\s*=.*', 'mail.password=' + password) if protocol == "smtp": @@ -205,13 +205,13 @@ def set_ldap(self, enable, auth_format, host, user, password, list_admins, searc raise KeyError("You must provide the search base user") self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco-global.properties', 'authentication.chain\s*=.*', 'authentication.chain=alfrescoNtlm1:alfrescoNtlm,ldap1:ldap') - self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.propertie', 'ldap.authentication.userNameFormat\s*=.*', 'ldap.authentication.userNameFormat=' + auth_format) - self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.propertie', 'ldap.authentication.java.naming.provider.url\s*=.*', 'ldap.authentication.java.naming.provider.url=ldap://' + host + ':389') - self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.propertie', 'ldap.authentication.defaultAdministratorUserNames\s*=.*', 'ldap.authentication.defaultAdministratorUserNames=' + list_admins) - self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.propertie', 'ldap.synchronization.java.naming.security.principal\s*=.*', 'ldap.synchronization.java.naming.security.principal=' + user) - self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.propertie', 'ldap.synchronization.java.naming.security.credentials\s*=.*', 'ldap.synchronization.java.naming.security.credentials=' + password) - self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.propertie', 'ldap.synchronization.groupSearchBase\s*=.*', 'ldap.synchronization.groupSearchBase=' + search_base_group) - self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.propertie', 'ldap.synchronization.userSearchBase\s*=.*', 'ldap.synchronization.userSearchBase=' + search_base_user) + self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.properties', 'ldap.authentication.userNameFormat\s*=.*', 'ldap.authentication.userNameFormat=' + auth_format) + self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.properties', 'ldap.authentication.java.naming.provider.url\s*=.*', 'ldap.authentication.java.naming.provider.url=ldap://' + host + ':389') + self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.properties', 'ldap.authentication.defaultAdministratorUserNames\s*=.*', 'ldap.authentication.defaultAdministratorUserNames=' + list_admins) + self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.properties', 'ldap.synchronization.java.naming.security.principal\s*=.*', 'ldap.synchronization.java.naming.security.principal=' + user) + self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.properties', 'ldap.synchronization.java.naming.security.credentials\s*=.*', 'ldap.synchronization.java.naming.security.credentials=' + password) + self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.properties', 'ldap.synchronization.groupSearchBase\s*=.*', 'ldap.synchronization.groupSearchBase=' + search_base_group) + self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap/ldap1/ldap-authentication.properties', 'ldap.synchronization.userSearchBase\s*=.*', 'ldap.synchronization.userSearchBase=' + search_base_user) else: self.replace_all(ALFRESCO_PATH + '/tomcat/shared/classes/alfresco-global.properties', 'authentication.chain\s*=.*', 'authentication.chain=alfrescoNtlm1:alfrescoNtlm') @@ -219,7 +219,8 @@ def init_data_folder(self): global ALFRESCO_PATH if len(os.listdir(ALFRESCO_PATH + '/alf_data')) < 3: - os.system('mv ' + ALFRESCO_PATH + '/alf_data_org/* ' + ALFRESCO_PATH + '/alf_data/') + # Replace mv per rsync to avoid bugs with autFS + os.system('rsync -a --remove-source-files ' + ALFRESCO_PATH + '/alf_data_org/. ' + ALFRESCO_PATH + '/alf_data') os.system('chown -R alfresco:alfresco ' + ALFRESCO_PATH + '/alf_data') diff --git a/assets/setup/install_alfresco.sh b/assets/setup/install_alfresco.sh index a49adad..ff291da 100755 --- a/assets/setup/install_alfresco.sh +++ b/assets/setup/install_alfresco.sh @@ -3,7 +3,9 @@ set -e # Add extra library apt-get update -apt-get install -y fontconfig libice6 libsm6 libxt6 libxrender1 libfontconfig1 libxinerama1 libglu1-mesa libcups2 ghostscript imagemagick xvfb xfonts-base +apt-get install -y --no-install-recommends sudo curl rsync supervisor fontconfig libice6 libsm6 libxt6 libxrender1 libfontconfig1 libxinerama1 libglu1-mesa libcups2 ghostscript imagemagick xvfb xfonts-base +apt-get clean +rm -rf /var/lib/apt/lists/* # vars ALF_HOME=/opt/alfresco diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3a1e888 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +alfresco: + environment: + CIFS_ENABLED: 'false' + FTP_ENABLED: 'false' + image: webcenter/rancher-alfresco:5.2-201612GA + links: + - postgres:db +postgres: + environment: + PGDATA: /var/lib/postgresql/data/pgdata + POSTGRES_DB: alfresco + POSTGRES_PASSWORD: 70Q83feNcsfG + POSTGRES_USER: alfresco + image: postgres:9.4