Create custom Alfresco Share image - Alfresco Content Services - 23.4 - 23.4 - Ready - Alfresco - external - Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Install/Install-using-containers/Customization/Create-custom-Alfresco-Share-image - 2025-07-01 - Let’s repeat the process for the Alfresco Share image.

Alfresco Content Services

Platform
Alfresco
Product
Alfresco Content Services
Release
23.4
License

Let’s repeat the process for the Alfresco Share image.

  1. Take note of the image and tag used for the share service in the Docker Compose file you chose in the previous section.
    For example, if you’re using compose.yaml, the following information is displayed:
     quay.io/alfresco/alfresco-share:x.x.x
    
  2. Add the following Docker commands to the share/Dockerfile file and save it. Make sure you change the image name and tag to match the above step:
     FROM quay.io/alfresco/alfresco-share:x.x.x
    
     ARG TOMCAT_DIR=/usr/local/tomcat
    
     ADD ./share_amps/*.amp ${TOMCAT_DIR}/amps_share/
    
     RUN java -jar ${TOMCAT_DIR}/alfresco-mmt/alfresco-mmt*.jar install \
         ${TOMCAT_DIR}/amps_share ${TOMCAT_DIR}/webapps/share -directory -nobackup -verbose
    
    where x.x.x is the version number.
    Note: In the example RUN docker command, alfresco-mmt jar is run with -directory, -nobackup and -verbose options. Make sure these options are suitable for your requirements. See the Using the Module Management Tool (MMT).
  3. Build the image, making sure you give the image an appropriate name and tag, so you can easily identify it later.
    In the following command, replace myregistrydomain/my-custom-alfresco-share:x.x (where x.x is the version number) and myregistrydomain/my-custom-alfresco-share:latest with your own Docker registry, image name and tag:
     docker build share -t myregistrydomain/my-custom-alfresco-share:x.x -t myregistrydomain/my-custom-alfresco-share:latest
    
    where x.x is the version number.

    Once the image build is complete, you should see success messages:

     Successfully built 6d5ee67935da
     Successfully tagged myregistrydomain/my-custom-alfresco-share:x.x
     Successfully tagged myregistrydomain/my-custom-alfresco-share:latest
    
    where x.x is the version number.
  4. Replace the image used by the share service in the Docker Compose file you chose in the previous section.
    For example, replace image: quay.io/alfresco/alfresco-share:x.x.x with image: myregistrydomain/my-custom-alfresco-share:x.x, where x.x.x and x.x are the version numbers.
  5. Save the file.