REPO-3335: fix docker file and few poms

This commit is contained in:
Andrei Rebegea
2018-03-09 16:47:36 +02:00
parent 73407ae9cb
commit 5f0d13cc77
11 changed files with 305 additions and 19 deletions

View File

@@ -0,0 +1 @@
test

View File

@@ -1,4 +1,58 @@
FROM quay.io/alfresco/alfresco-content-services-community:latest
FROM quay.io/alfresco/alfresco-base-tomcat:0.1.0
# Base ACS Repository Image includes transformation commands:
# /usr/bin/alfresco-pdf-renderer - alfresco-pdf-renderer
# /usr/bin/convert - imagemagick
# /opt/libreoffice5.4/program/soffice - LibreOffice
ENV ALFRESCO_PDF_RENDERER_LIB_RPM_URL=https://nexus.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/alfresco-pdf-renderer/1.0/alfresco-pdf-renderer-1.0-linux.tgz
ENV LIBREOFFICE_RPM_URL=http://download.documentfoundation.org/libreoffice/stable/5.4.5/rpm/x86_64/LibreOffice_5.4.5_Linux_x86-64_rpm.tar.gz
ENV IMAGEMAGICK_RPM_URL=https://www.imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-7.0.7-25.x86_64.rpm
ENV IMAGEMAGICK_LIB_RPM_URL=https://www.imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-libs-7.0.7-25.x86_64.rpm
RUN wget $ALFRESCO_PDF_RENDERER_LIB_RPM_URL && \
tar xf alfresco-pdf-renderer-*-linux.tgz -C /usr/bin && \
rm -f alfresco-pdf-renderer-*-linux.tgz && \
\
yum install -y cairo cups-libs libSM && \
wget $LIBREOFFICE_RPM_URL && \
tar xzf LibreOffice_*_Linux_x86-64_rpm.tar.gz && \
yum localinstall -y LibreOffice*/RPMS/*.rpm && \
rm -rf LibreOffice_*_Linux_x86-64_rpm.tar.gz LibreOffice_*_Linux_x86-64_rpm && \
\
wget $IMAGEMAGICK_RPM_URL && \
wget $IMAGEMAGICK_LIB_RPM_URL && \
yum localinstall -y ImageMagick-*.x86_64.rpm && \
rm -f ImageMagick-*.x86_64.rpm && \
\
yum clean all
RUN mkdir -p /usr/local/tomcat/shared/classes && \
mkdir /usr/local/tomcat/alfresco-mmt
RUN touch /usr/local/tomcat/shared/classes/alfresco-global.properties
COPY target/war /usr/local/tomcat/webapps
COPY target/connector/* /usr/local/tomcat/lib/
COPY target/alfresco-mmt/* /usr/local/tomcat/alfresco-mmt/
RUN rm -rf /usr/local/tomcat/webapps/ROOT
COPY target/server-root/* /usr/local/tomcat/webapps
RUN sed -i "s/shared.loader=/shared.loader=\${catalina.base}\/shared\/classes/" /usr/local/tomcat/conf/catalina.properties
RUN echo -e '\n\
alfresco-pdf-renderer.root=/usr/bin/\n\
alfresco-pdf-renderer.exe=${alfresco-pdf-renderer.root}/alfresco-pdf-renderer\n\
\n\
jodconverter.enabled=true\n\
jodconverter.portNumbers=8100\n\
jodconverter.officeHome=/opt/libreoffice5.4/\n\
\n\
img.root=/usr/lib64/ImageMagick-7.0.7\n\
img.coders=/usr/lib64/ImageMagick-7.0.7/modules-Q16HDRI/coders\n\
img.config=/usr/lib64/ImageMagick-7.0.7/config-Q16HDRI\n\
img.exe=/usr/bin/convert\n\
' >> /usr/local/tomcat/shared/classes/alfresco-global.properties
RUN mkdir -p /usr/local/tomcat/amps

View File

@@ -1,17 +1,39 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>content-services-community-full-docker-alfresco</artifactId>
<name>ACS Community full Docker image builder for Alfresco</name>
<artifactId>content-services-community-docker-alfresco</artifactId>
<name>ACS Community Docker image builder for Alfresco</name>
<packaging>pom</packaging>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>full-community-packaging</artifactId>
<artifactId>acs-community-packaging</artifactId>
<version>6.0.4-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>content-services-community</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-server-root</artifactId>
<version>${dependency.alfresco-server-root.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${dependency.postgresql.version}</version>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-mmt</artifactId>
<version>${dependency.alfresco-mmt.version}</version>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-share-services</artifactId>
@@ -46,7 +68,64 @@
<version>3.0.2</version>
<executions>
<execution>
<id>copy-resources</id>
<id>unpack-resources</id>
<phase>process-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.alfresco</groupId>
<artifactId>content-services-community</artifactId>
<version>${project.version}</version>
<type>war</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/war/alfresco</outputDirectory>
<destFileName>alfresco.war</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>copy-resources-war</id>
<phase>process-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${dependency.postgresql.version}</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/connector</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-mmt</artifactId>
<version>${dependency.alfresco-mmt.version}</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/alfresco-mmt</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-server-root</artifactId>
<version>${dependency.alfresco-server-root.version}</version>
<type>war</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/server-root</outputDirectory>
<destFileName>ROOT.war</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>copy-resources-amps</id>
<phase>process-resources</phase>
<goals>
<goal>copy</goal>

View File

@@ -0,0 +1 @@
ALFRESCO_TAG=latest

View File

@@ -0,0 +1,51 @@
version: "3"
services:
alfresco:
image: quay.io/alfresco/alfresco-content-services-community:${ALFRESCO_TAG}
environment:
JAVA_OPTS : "
-Ddb.driver=org.postgresql.Driver
-Ddb.username=alfresco
-Ddb.password=alfresco
-Ddb.url=jdbc:postgresql://postgres:5432/alfresco
-Dsolr.host=solr6
-Dsolr.port=8983
-Dsolr.secureComms=none
-Dsolr.base.url=/solr
-Dindex.subsystem.name=solr6
-Dalfresco.restApi.basicAuthScheme=true
-Dimap.server.enabled=true
-Dftp.enabled=true
-Dftp.dataPortFrom=30000
-Dftp.dataPortTo=30099
"
ports:
- 8080:8080
- 445:445
- 143:143
- "21:21"
- "30000-30099:30000-30099"
postgres:
image: docker.io/library/postgres:9.4.12
environment:
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
- POSTGRES_DB=alfresco
ports:
- 5432:5432
solr6:
image: quay.io/alfresco/search-services:1.2.0-SNAPSHOT
environment:
#Solr needs to know how to register itself with Alfresco
- SOLR_ALFRESCO_HOST=alfresco
- SOLR_ALFRESCO_PORT=8080
#Alfresco needs to know how to call solr
- SOLR_SOLR_HOST=solr6
- SOLR_SOLR_PORT=8983
#Create the default alfresco and archive cores
- SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
ports:
- 8083:8983 #Browser port