Movatterモバイル変換


[0]ホーム

URL:


In: content-servicesIn: All docs
Close
Alfresco Content Services

Customization guidelines

Although it’s possible to change and mount files/folders into existing Docker images the recommended approach is to create new custom Docker images.

Installing AMPs also requires the creation of a custom image, this guide describes the steps required to install AMP files into Alfresco Content Repository and Alfresco Share images. These custom images can then be deployed using docker-compose.

This process requires some familiarity withDocker and specificallyDockerfile commands.

Setting up

  1. Clone the repository and change directory toacs-deployment:

     git clone https://github.com/Alfresco/acs-deployment.git cd acs-deployment
  2. Switch to thedocker-compose directory, then create subdirectories to hold the AMP files and Dockerfiles:

     cd docker-compose && \ mkdir -p repository/amps share/share_amps && \ touch repository/Dockerfile share/Dockerfile
  3. Copy your Alfresco AMP files to the newly createdrepository/amps directory and copy your Share AMP files to the newly createdshare/share_amps directory.

Create custom repository image

You now need to install the AMP files into the Alfresco Content Repository image.

  1. Thedocker-compose folder contains a file for each main code line of Content Services. Examine the relevant Docker Compose file for the version you want to apply the AMPs to.

    For example, to apply AMPs to the latest version of 7.0, take a look at the7.0.N-docker-compose.yml file.

  2. Take note of the image and tag used for thealfresco service in the Docker Compose file you chose.

    For example, if you’re using7.0.N-docker-compose.yml, you’ll find online 15:

     quay.io/alfresco/alfresco-content-repository:7.0.1
  3. Add the following Docker commands to therepository/Dockerfile file and save it. Make sure that you change the image name and tag to match the above step:

     FROM quay.io/alfresco/alfresco-content-repository:7.0.1 # Customize container: install amps ARG TOMCAT_DIR=/usr/local/tomcat USER root ADD ./amps/*.amp ${TOMCAT_DIR}/amps/ RUN java -jar ${TOMCAT_DIR}/alfresco-mmt/alfresco-mmt*.jar install \     ${TOMCAT_DIR}/amps ${TOMCAT_DIR}/webapps/alfresco -directory -nobackup -verbose USER alfresco

    Note: In the example RUN Docker command, the Alfresco MMT JAR is run with-directory,-nobackup and-verbose options. Make sure these options are suitable for your requirements. See theAlfresco MMT documentation for more.

  4. Build the image, making sure you give the image an appropriate name and tag, so you can easily identify it later.

    In the example, replacemyregistrydomain/my-custom-alfresco-content-repository:7.0 andmyregistrydomain/my-custom-alfresco-content-repository:latest with your own Docker registry, image name, and tag:

     docker build repository -t myregistrydomain/my-custom-alfresco-content-repository:7.0 -t myregistrydomain/my-custom-alfresco-content-repository:latest

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

     Successfully built 632eda3ea296 Successfully tagged myregistrydomain/my-custom-alfresco-content-repository:7.0 Successfully tagged myregistrydomain/my-custom-alfresco-content-repository:latest
  5. Replace the image used by thealfresco service in the Docker Compose file you chose in step 1.

    For example, replaceimage: quay.io/alfresco/alfresco-content-repository:7.0.1 withimage: myregistrydomain/my-custom-alfresco-content-repository:7.0:

  6. Save the file.

Create custom Alfresco Share image

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

  1. Take note of the image and tag used for theshare service in the Docker Compose file you chose in the previous section.

    For example, if you’re using7.0.N-docker-compose.yml, you’ll find online 94:

     quay.io/alfresco/alfresco-share:7.0.1
  2. Add the following Docker commands to theshare/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:7.0.1 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

    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 theAlfresco MMT documentation.

  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, replacemyregistrydomain/my-custom-alfresco-share:7.0 andmyregistrydomain/my-custom-alfresco-share:latest with your own Docker registry, image name and tag:

     docker build share -t myregistrydomain/my-custom-alfresco-share:7.0 -t myregistrydomain/my-custom-alfresco-share:latest

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

     Successfully built 6d5ee67935da Successfully tagged myregistrydomain/my-custom-alfresco-share:7.0 Successfully tagged myregistrydomain/my-custom-alfresco-share:latest
  4. Replace the image used by theshare service in the Docker Compose file you chose in the previous section.

    For example, replaceimage: quay.io/alfresco/alfresco-share:7.0.1 withimage: myregistrydomain/my-custom-alfresco-share:7.0

  5. Save the file.

Start the system

You’ve now built two custom images, one for the Alfresco Content Repository and one for Alfresco Share, and added them to yourdocker-compose.yml services.

You can start your customdocker-compose.yml file using the following command:

docker-compose -f <your-modified-docker-compose.yml> up

You’ll find more information in the following pages:

Edit this page

Suggest an edit on GitHub
By clicking "Accept Cookies", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts.View Cookie Policy.

[8]ページ先頭

©2009-2025 Movatter.jp