Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn committed Apr 22, 2024
0 parents commit 7d2fadc
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.zip
dist
29 changes: 29 additions & 0 deletions repository/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM quay.io/alfresco/alfresco-base-tomcat:tomcat10-jre17-rockylinux9 as BUILD

RUN yum install -y unzip

ADD alfresco-content-services-distribution-23.2.1.zip /tmp/

RUN unzip /tmp/alfresco-content-services-distribution-23.2.1.zip -d /tmp/distribution

RUN mkdir -p /usr/local/tomcat/shared/classes/alfresco/extension/keystore/

RUN cp /tmp/distribution/web-server/webapps/alfresco.war /usr/local/tomcat/webapps/
RUN cp -ra /tmp/distribution/web-server/conf/* /usr/local/tomcat/conf/ && rm -f /usr/local/tomcat/conf/Catalina/localhost/share.xml
RUN cp -ra /tmp/distribution/web-server/lib/* /usr/local/tomcat/lib/
RUN cp -ra /tmp/distribution/web-server/shared/* /usr/local/tomcat/shared/
RUN cp -ra /tmp/distribution/keystore/metadata-keystore/keystore* /usr/local/tomcat/shared/classes/alfresco/extension/keystore/

RUN sed -i 's|shared.loader=|shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar|' /usr/local/tomcat/conf/catalina.properties
RUN sed -i 's|../modules/platform|modules/platform|' /usr/local/tomcat/conf/Catalina/localhost/alfresco.xml

FROM quay.io/alfresco/alfresco-base-tomcat:tomcat10-jre17-rockylinux9

RUN mkdir -p /usr/local/tomcat/modules/platform /usr/local/tomcat/modules/share

COPY --from=BUILD /usr/local/tomcat/conf /usr/local/tomcat/conf
COPY --from=BUILD /usr/local/tomcat/lib /usr/local/tomcat/lib
COPY --from=BUILD /usr/local/tomcat/shared /usr/local/tomcat/shared
COPY --from=BUILD /usr/local/tomcat/webapps /usr/local/tomcat/webapps

CMD ["catalina.sh", "run"]
30 changes: 30 additions & 0 deletions scripts/fetch-artifact.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash -e
# Fetch artifact from Nexus which will be used to build the Docker image

ARTIFACT_NAME=$1
DEFAULT_ARTIFACT_NAME=alfresco-content-services-distribution

ARTIFACT_VERSION=$2
DEFAULT_ARTIFACT_VERSION=23.2.1

GROUP_ID=$3
DEFAULT_GROUP_ID=org.alfresco

if [ -z "$ARTIFACT_NAME" ]; then
ARTIFACT_NAME=$DEFAULT_ARTIFACT_NAME
fi

if [ -z "$ARTIFACT_VERSION" ]; then
ARTIFACT_VERSION=$DEFAULT_ARTIFACT_VERSION
fi

if [ -z "$GROUP_ID" ]; then
GROUP_ID=$DEFAULT_GROUP_ID
fi

GROUP_ID_AS_PATH=$(echo "$GROUP_ID" | tr . /)


echo "Downloading $GROUP_ID:$ARTIFACT_NAME $ARTIFACT_VERSION from Nexus"
wget --user "$NEXUS_USERNAME:$NEXUS_PASSWORD" \
"https://nexus.alfresco.com/nexus/service/local/repositories/enterprise-releases/content/$GROUP_ID_AS_PATH/$ARTIFACT_NAME/${ARTIFACT_VERSION}/$ARTIFACT_NAME-${ARTIFACT_VERSION}.zip"

0 comments on commit 7d2fadc

Please sign in to comment.