Dockerfile 1.72 KB
Newer Older
Martin Muller's avatar
Martin Muller committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
FROM debian:jessie


ENV ALF_INSTALLER_DIR /alfresco/installer
ENV ALFRESCO_HOME /opt/alfresco
ENV GLOBAL_PROPS $ALFRESCO_HOME/tomcat/shared/classes/alfresco-global.properties
ENV ALF_INSTALL_OPTIONS_FILE install_options.txt

#RUN apt-get update && \
#    DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y && \
#    apt-get clean && \
#    rm -rf /var/lib/apt/lists/*

RUN mkdir -p $ALF_INSTALLER_DIR
COPY resources/$ALF_INSTALL_OPTIONS_FILE $ALF_INSTALLER_DIR/
COPY installer/*.bin $ALF_INSTALLER_DIR/

RUN chmod +x $ALF_INSTALLER_DIR/*.bin && $ALF_INSTALLER_DIR/*.bin --optionfile $ALF_INSTALLER_DIR/$ALF_INSTALL_OPTIONS_FILE && rm -r $ALF_INSTALLER_DIR

RUN touch $ALFRESCO_HOME/tomcat/logs/catalina.out

COPY resources $ALFRESCO_HOME/tomcat/shared/classes/alfresco/extension/
RUN mkdir $ALFRESCO_HOME/tomcat/shared/classes/alfresco/module
RUN mkdir $ALFRESCO_HOME/tomcat/shared/classes/alfresco/module/my-hack
COPY resources $ALFRESCO_HOME/tomcat/shared/classes/alfresco/module/my-hack

COPY resources $ALFRESCO_HOME/tomcat/shared/classes/alfresco/web-extension/

# You need to run `mvn clean install` in the root of this project to update the following dependencies
# Copy the JDBC drivers for the database you are using to the lib/ directory.
COPY target/connector/* $ALFRESCO_HOME/tomcat/lib/

# Copy the amps from build context to the image for installing it manually later
COPY target/amps/* /alfresco/

#Enable debugging on port 8000
RUN sed -i "s/exec \"\$PRGDIR\"\/\"\$EXECUTABLE\" start \"\$@\"/exec \"\$PRGDIR\"\/\"\$EXECUTABLE\" jpda start \"\$@\"/" $ALFRESCO_HOME/tomcat/bin/startup.sh

COPY resources $ALFRESCO_HOME/
RUN chmod +x $ALFRESCO_HOME/docker_start.sh

EXPOSE 8080

CMD /bin/bash -c $ALFRESCO_HOME/docker_start.sh