Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPSEXP-2800 Add share component Dockerfile #47

Merged
merged 12 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ prepare_connectors: scripts/fetch-artifacts.sh setenv
@echo "Fetching all artifacts for Connectors targets"
@./scripts/fetch-artifacts.sh connector

prepare_share: scripts/fetch-artifacts.sh setenv
@echo "Fetching all artifacts for Share targets"
@./scripts/fetch-artifacts.sh share

prepare_all: scripts/fetch-artifacts.sh setenv
@echo "Fetching all artifacts"
@./scripts/fetch-artifacts.sh
Expand All @@ -77,6 +81,10 @@ connectors: prepare_connectors
@echo "Building Connectors images"
docker buildx bake ${DOCKER_BAKE_ARGS} connectors

share: prepare_share
@echo "Building Share images"
docker buildx bake ${DOCKER_BAKE_ARGS} share

all: docker-bake.hcl prepare_all
@echo "Building all images"
docker buildx bake ${DOCKER_BAKE_ARGS}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Using this tool to build Alfresco images requires:
require authentication
* Some Unix tools: `jq`, `wget`, `make`

Configuring the authentication to Alfresco NExus server must be dopne using the
Configuring the authentication to Alfresco Nexus server must be done using the
wget rc file `~/.wgetrc` or `~/.netrc`:

```sh
Expand Down
22 changes: 21 additions & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group "default" {
targets = ["content_service", "enterprise-search", "ats", "tengines", "connectors"]
targets = ["content_service", "enterprise-search", "ats", "tengines", "connectors", "share"]
}

group "content_service" {
Expand All @@ -22,6 +22,10 @@ group "connectors" {
targets = ["connector_msteams", "connector_ms365"]
}

group "share" {
targets = ["share"]
}

pmacius marked this conversation as resolved.
Show resolved Hide resolved
variable "REGISTRY" {
default = "localhost"
}
Expand Down Expand Up @@ -546,3 +550,19 @@ target "connector_ms365" {
output = ["type=docker"]
platforms = split(",", "${TARGETARCH}")
}

target "share" {
context = "./share"
dockerfile = "Dockerfile"
inherits = ["tomcat_base"]
contexts = {
tomcat_base = "target:tomcat_base"
}
labels = {
"org.opencontainers.image.title" = "${PRODUCT_LINE} Share Enterprise"
"org.opencontainers.image.description" = "Alfresco Share Enterprise"
pmacius marked this conversation as resolved.
Show resolved Hide resolved
}
tags = ["${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-share:${TAG}"]
output = ["type=docker"]
platforms = split(",", "${TARGETARCH}")
}
2 changes: 1 addition & 1 deletion repository/amps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ way to build well structured AMPs.
> SDK](https://docs.alfresco.com/content-services/latest/develop/oop-sdk/) to
> build Docker images with your extensions.

By default the `scripts/fetch-amps.sh` script will fetch the following AMPs from the Alfresco Nexus repository:
By default the `scripts/fetch-artifacts.sh` script will fetch the following AMPs from the Alfresco Nexus repository:

* alfresco-share-services
* alfresco-aos-module
Expand Down
35 changes: 35 additions & 0 deletions share/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM tomcat_base

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
pmacius marked this conversation as resolved.
Show resolved Hide resolved

COPY substituter.sh ${CATALINA_HOME}/shared/classes/alfresco

ADD amps /tmp/amps
ADD distribution /tmp/
ENV DISTDIR="/tmp/distribution"

RUN yum install -y unzip xmlstarlet && \
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 &&\
pmacius marked this conversation as resolved.
Show resolved Hide resolved
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 &&\
sed -i "s/shared.loader=/shared.loader=\${catalina.base}\/shared\/classes/" ${CATALINA_HOME}/conf/catalina.properties &&\
chmod +x ${CATALINA_HOME}/shared/classes/alfresco/substituter.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

ENTRYPOINT ["/usr/local/tomcat/shared/classes/alfresco/substituter.sh", "catalina.sh run"]
pmacius marked this conversation as resolved.
Show resolved Hide resolved
Empty file added share/README.md
Empty file.
Empty file added share/amps/README.md
Empty file.
22 changes: 22 additions & 0 deletions share/artifacts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"artifacts": {
"acs23": [
{
"name": "alfresco-content-services-share-distribution",
"version": "23.2.2",
"path": "share/distribution",
"classifier": ".zip",
"group": "org.alfresco",
"repository": "enterprise-releases"
},
{
"name": "alfresco-googledrive-share",
"version": "4.1.0",
"path": "share/amps",
"classifier": ".amp",
"group": "org.alfresco.integrations",
"repository": "releases"
}
]
}
}
17 changes: 17 additions & 0 deletions share/distribution/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Alfresco Content Services share distribution

Place here the version of Alfresco Content Services share distribution you want to
use in your Docker image.
Distribution file must be a ZIP file with the expected structure of an Alfresco
Content Services share distribution.

```tree
amps/
bin/
web-extension-samples/
web-server/
|_webapps/
|_conf/
|_Catalina/
|_localhost/
```
Loading
Loading