diff --git a/share/Dockerfile b/share/Dockerfile index 1afce591..aab22b60 100644 --- a/share/Dockerfile +++ b/share/Dockerfile @@ -6,10 +6,7 @@ USER root EXPOSE 8000 RUN mkdir -p ${CATALINA_HOME}/shared/classes/alfresco/web-extension \ - ${CATALINA_HOME}/amps_share \ - ${CATALINA_HOME}/webapps/share/ \ - ${CATALINA_HOME}/alfresco-mmt/ \ - /licenses + ${CATALINA_HOME}/conf/Catalina/localhost COPY entrypoint.sh ${CATALINA_HOME}/shared/classes/alfresco @@ -20,19 +17,18 @@ ENV DISTDIR="/tmp/distribution" RUN yum install -y unzip && \ unzip /tmp/*.zip -d ${DISTDIR} &&\ unzip ${DISTDIR}/alfresco*/web-server/webapps/share.war -d ${CATALINA_HOME}/webapps/share/ &&\ - cp ${DISTDIR}/alfresco*/bin/* ${CATALINA_HOME}/alfresco-mmt/ &&\ - cp -r ${DISTDIR}/alfresco*/amps ${CATALINA_HOME}/amps_share &&\ - cp /tmp/amps/*.amp ${CATALINA_HOME}/amps_share &&\ + cp -r ${DISTDIR}/alfresco*/amps/ /tmp/amps/ &&\ cp ${DISTDIR}/alfresco*/web-extension-samples/custom-slingshot-application-context.xml.sample ${CATALINA_HOME}/shared/classes/alfresco/web-extension &&\ cp ${DISTDIR}/alfresco*/web-extension-samples/smartfolders-amp-actions-config.xml ${CATALINA_HOME}/shared/classes/alfresco/web-extension &&\ cp /tmp/share-config-custom.xml ${CATALINA_HOME}/shared/classes/alfresco/web-extension &&\ - rm -rf ${DISTDIR} /tmp &&\ + cp ${DISTDIR}/alfresco*/web-server/conf/Catalina/localhost/share.xml ${CATALINA_HOME}/conf/Catalina/localhost &&\ + sed -i 's|../modules/share|modules/share|' ${CATALINA_HOME}/conf/Catalina/localhost/share.xml &&\ sed -i "s/shared.loader=/shared.loader=\${catalina.base}\/shared\/classes/" ${CATALINA_HOME}/conf/catalina.properties &&\ chmod +x ${CATALINA_HOME}/shared/classes/alfresco/entrypoint.sh &&\ yum clean all && rm -rf /var/cache/yum -RUN java -jar ${CATALINA_HOME}/alfresco-mmt/alfresco-mmt*.jar install \ - ${CATALINA_HOME}/amps_share ${CATALINA_HOME}/webapps/share -directory -nobackup -force +RUN java -jar ${DISTDIR}/alfresco*/bin/alfresco-mmt.jar install \ + /tmp/amps/ ${CATALINA_HOME}/webapps/share -directory -nobackup -force FROM tomcat_base AS share-rhlike ARG ALFRESCO_SHARE_USER_ID @@ -40,12 +36,12 @@ ARG ALFRESCO_SHARE_GROUP_ID ARG ALFRESCO_SHARE_GROUP_NAME ARG ALFRESCO_SHARE_USER_NAME -COPY --chown=:${ALFRESCO_SHARE_GROUP_ID} --from=share_build ${CATALINA_HOME} ${CATALINA_HOME} +COPY --chown=${ALFRESCO_SHARE_USER_ID}:${ALFRESCO_SHARE_GROUP_ID} --from=share_build ${CATALINA_HOME} ${CATALINA_HOME} USER root RUN groupadd -g ${ALFRESCO_SHARE_GROUP_ID} ${ALFRESCO_SHARE_GROUP_NAME} && \ useradd -u ${ALFRESCO_SHARE_USER_ID} -g ${ALFRESCO_SHARE_GROUP_NAME} ${ALFRESCO_SHARE_USER_NAME} -G tomcat && \ - mkdir -m 750 -p ${CATALINA_HOME}/modules/platform && \ + mkdir -m 750 -p ${CATALINA_HOME}/modules/share && \ chgrp -R ${ALFRESCO_SHARE_GROUP_ID} ${CATALINA_HOME}/modules && \ yum install -y xmlstarlet && \ yum clean all && rm -rf /var/cache/yum