Ir al contenido principal

Creating Docker containers for Adobe Experience Manager

This is a Docker tutorial for creating a docker image for the Galen framework, above is the vid and below you will find some of the steps followed.
  • Adobe experience manager is a content management system which in a nutshell is an application that allows us to create web sites to be consumed by end users. You might be familiar with other such applications like wordpress or drupal which serves the same purpose

  • A typical deployment would be comprised of two AEM instances, the author instance used for creating and modifying content, the publish instance which serves the content and finally we have a dispatcher which is a static web server used for caching, load balancing and some security purposes.

  • We can configure an AEM instance to work as an author or publish instance by either changing the file name for the jar file

    java -jar cq-author-4502.jar
    java -jar cq-publish-4503.jar
  • Or by using the run modes to configure the instance

    java -jar cq-quickstart.jar -p 4502
    java -jar cq-quickstart.jar -p 4503
  1. 1.


    • Have Java installed (If you want to start AEM outside docker)
    • Have an AEM instance jar and the files
      And docker installed
  2. 2.

    Create a base AEM image in docker so it can be reused

    • Start from a clean ubuntu image
      FROM ubuntu
    • Create default/working directory
      WORKDIR /opt/aem
    • Install Oracle's Java 8 inside the docker container
      RUN apt-get update && \
          apt-get install -y curl && \
          apt-get install -y software-properties-common && \
          add-apt-repository ppa:openjdk-r/ppa && \
          apt-get update && \
          apt-get install -y openjdk-8-jdk && \
          rm -rf /var/lib/apt/lists/* && \
          rm -rf /var/cache/oracle-jdk8-installer
    • Copy the license and jar file into the image
      ADD ./
      ADD cq-quickstart-6.3.0.jar cq-quickstart.jar
    • Unpack the jar for future use on other images, child images should use the cq-quickstart.jar file when interacting with AEM
      RUN java -jar cq-quickstart.jar -unpack
    • Build the image
      docker build -t aem .
  3. 3.

    Create a container for the author or publish instances

    • Use the base image
      FROM aem
    • Export the port number
    • Start AEM using the same port as above and provide the run mode value: author or publish and for the port: 4502 or 4503
      ENTRYPOINT ["java", "-Xmx1024M", "-jar", "cq-quickstart.jar", "", "-p", "PORT-NUMBER"]
    • Build the image and define the name for the type of instance: author or publish
      docker build -t INSTANCE-TYPE .
      docker build -t author .
    • And finally start the container using the name for the type of instance: author or publish and map the corresponding ports the port: 4502 or 4503
      docker run -p 4502:4502 author
  4. 4.

    Create a docker container for the dispatcher using default configurations

    • Use an apache image as a base (This one already have some configurations like the port 80 already exposed)
      FROM httpd:2.4
    • Create default/working directory
      WORKDIR /usr/src/app
    • Download the dispatcher module
      ADD ./dispatcher/
    • Unzip it and then copy the module file into apache's modules folder
      RUN tar -xzvf ./dispatcher/dispatcher-apache2.4-linux-x86-64-4.2.3.tar.gz -C ./dispatcher && \
          cp ./dispatcher/ /usr/local/apache2/modules/
    • Copy a local version of the dispatcher.any file already modified to work with the publish instance, take into account that the configuration on that file is expecting that you are starting the containers using docker-compose and that the service for the publish instance is also called publish.

      If you need another name or to start the container using just docker change any text matching the text "publish" to the new one or the ip of your publish container

      ADD dispatcher.any /usr/local/apache2/conf/dispatcher.any
    • Copy a local version of the httpd.conf file already modified to use the dispatcher module.

      COPY httpd.conf /usr/local/apache2/conf/httpd.conf
    • Start all the containers using docker-compose
      docker-compose up
  5. 5.


Entradas populares de este blog

Create a custom AEM workflow process step with a dialog

In this tutorial I talk about how to create a custom workflow step process with an additional dialog for configuring it, above is the vid and below you will find some useful notes. 1. Pre-reqs Have access to an Adobe Experience Manager instance. Have Maven installed, understand how it works and also understand how to use Adobe's archetype, you can watch my video about maven here: Creating an AEM application using Maven and Adobe's archetype 2. What is an AEM Workflow and workflow model Workflows allow you to automate different tasks inside AEM by defining a s

Creating a Mongo replicaset using docker: Mongo replicaset + Nodejs + Docker Compose

This is a Docker tutorial for creating a Mongo replica set using docker compose and also a couple more containers to experiment with the replica set, above is the vid and below you will find some of the steps followed. Steps Pre-reqs Have node.js installed And docker installed (make sure you have docker-compose as well) Create a container for defining configurations for a mongo instance Create a container for setting up the replica set Create a simple node app using expressjs and mongoose (A modified version from the previous video ) Create a docker-compose file with the mongo and setup containers and two additional containers for experimenting with the replica set Build, Run and experiment with your new containers Create a dockerfile for the first mongo container (not really needed but you could configure more stuff if needed) Include container with mongo preinstalled:  FROM mongo Create default/working directory:  WORKDIR /usr/src/configs Copy mongo