How to add my extensions to ACS 6 containers

Extending ACS 6 docker images

After you have your ACS 6 local environment running, you’re probably thinking, this is nice, but I want to deploy my favorite amps, like JS console, Alfresco Governance Services (AGS), or even custom developed amps developed with Alfresco SDK.

In short, the goal would be to derive your own container using the ACS6 container as a base. Then deploy that container to a registry like docker hub, which also supports private repositories that you can pull from and deploy in your environments.

Why am I doing it this way? I recommend this free course to answer that question:

In short, it’s to speed up deploy times, and orchestration and rolling updates from a Kubernetes layer.


To extend the base image, you have 2 approaches. Create a new Docker Image with the ACS image as your base, or clone the ACS docker image project, and extend the 

In my case, I choose to extend the base image so that I don’t depend on access to source for maintenance.

Extending ACS Content Repository Community 6.0.5 EA base with Java-Script Console support

Create a folder acsrepo6 with the following Dockerfile

FROM alfresco/alfresco-content-repository-community:6.0.5-ea
MAINTAINER Alexander Mahabir

RUN cd /usr/local/tomcat/amps; \
  curl -L \
  --output javascript-console-repo-0.6.0.amp
## Repackage alfresco application into war archive to install amps
RUN cd /usr/local/tomcat/webapps/alfresco; jar -cMf ../alfresco.war .
RUN java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install \
   /usr/local/tomcat/amps /usr/local/tomcat/webapps/alfresco.war -directory -nobackup -force
RUN cd /usr/local/tomcat/webapps/alfresco; jar -xf ../alfresco.war
RUN rm -f /usr/local/tomcat/webapps/alfresco.war

Navigate to that folder and run

docker build -t acs-6-extended . --squash

NB: Use of –squash flag to keep collapse the layers of your Dockerfile so that the resulting size of your image remains small.

Extending ACS  Share 6.0.a  base with Java-Script Console

Create a folder acsshare6 with the following Dockerfile

FROM alfresco/alfresco-share:6.0.a
MAINTAINER Alexander Mahabir

RUN cd /usr/local/tomcat/amps_share; \
  curl -L \
  --output javascript-console-share-0.6.0.amp
## Repackage alfresco application into war archive to install amps
RUN cd /usr/local/tomcat/webapps/share; jar -cMf ../share.war .
RUN java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install \
   /usr/local/tomcat/amps_share /usr/local/tomcat/webapps/share.war -directory -nobackup -force
RUN cd /usr/local/tomcat/webapps/share; jar -xf ../share.war
RUN rm -f /usr/local/tomcat/webapps/share.war

Then navigate to the folder and build the image

docker build -t acs-share-6-extended . --squash

We should now have 2 container images with our extensions

You can verify with the following command

 docker images -a |grep extended




Update your docker-compose.yml to use your custom/extended images

version: "3"

        image: acs-6-extended
            JAVA_OPTS : "
            - 8082:8080 #Browser port

        image: acs-share-6-extended
            - REPO_HOST=alfresco
            - REPO_PORT=8080
            - 8080:8080

        image: postgres:10.1
            - POSTGRES_PASSWORD=alfresco
            - POSTGRES_USER=alfresco
            - POSTGRES_DB=alfresco
        command: postgres -c max_connections=300 -c log_min_messages=LOG
            - 5432:5432

        image: alfresco/alfresco-search-services:1.1.1
            #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
            - 8083:8983 #Browser port

Then start the system up with the following command

dockder-compose up

You should now have ACS 6 EA, with JS console in share

Navigate to http://DOCKER_HOST:8080/share


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: