Getting started guide for development with Adobe Experience Manager together with Docker. The configuration contains an AEM author, publisher and dispatcher environment, running in three separate containers. Docker images also have support for installing AEM packages during build.
In case you are using the AEM as cloud please follow below link to setting up the default dispatcher as part of the cloud. Dispatcher Docker
This tutorial assumes running on a Mac. Installation on Windows might differ for certain steps. The following items are required:
- Docker with at least 4GB memory allocated (Recommended for 8GB)
- AEM installation file, name it
aem-quickstart.jar
. Name has to match as mentioned. - AEM license file, named
license.properties
. Name has to match as mentioned. - Recommended: Homebrew package manager
- Clone this repository to a local directory and put the AEM installation file, license file in the root.
- Put AEM quickstart jar file in
./aem_instance/
- Put AEM packages that need to be installed during build in
./aem_packages/
. Order of installation will be alphabetically, based on package file name. - run
start-aem-docker.sh
or
- Build the Docker images with
docker build -t aem-base -f base/Dockerfile . && docker-compose build
inside "aem-docker-getting-started" folder. This will take time depending on the number of packages, as the author and publisher are started during build to be able to install packages. - Start the Docker containers with
docker-compose up
. This will also mount the./logs
directory on your local system to the containers, so you have easy access to the logs of all containers.
- Wait until AEM has fully started. To check for the author, open the bundles page and when all bundle status are either
Active
orFragment
the AEM environment has fully started.
Author URL: http://localhost:4502
username: admin
password: admin
Dispatcher URL: http://localhost
Publisher: http://localhost:4503
~ Starting and stopping containers preserves AEM content.
~ Images need to be rebuild when changing packages in the aem_packages
directories.
~ After stopping a container, or after a system reboot, you can use docker-compose up
to start the containers.
to Start use start-aem-docker.sh
and to reset,delete everything use reset-aem-docker.sh
/aem-docker-getting-started
|- aem_instance
| |- aem-quickstart.jar
| |- license.properties
|- aem_packages
| |- aem-service-pkg-6.5.2.zip
|- base
| |- Dockerfile
|- author
| |- Dockerfile
|- publish
| |- Dockerfile
|- dispatcher
| |- Dockerfile and other files
|- logs
|- other files as per this repo
- Install Java 8/11 SDK:
For MAC:
brew cask install java8/11
. For Windows use installer version .msi/.exe file and set up the Environment path. - Install Maven:
For MAC:
brew install maven
. For windows: Download the bin file form apache maven and follow environment path setup. - Download and install IntelliJ IDEA from JetBrains or install with
brew cask install caskroom/cask/intellij-idea-ce
. - Clone the AEM WKND Sites repository to a local directory.
- Open the folder with the AEM WKND Sites sample in IntelliJ. In IntelliJ, click on the right-top corner on the dropdown and select
Edit Configurations
. Add aNew Configuration
with the plus-icon on the top-left corner, selectMaven
. Set the name asDeploy author
, set the working directory asaem-guides-wknd
, command lineclean install -e
and profilesautoInstallPackage
. Now save the configuration. - Click on the play button on the top-right corner to run the
Deploy author
configuration. You might get an error that the Java JDK can't be found:Project JDK is not specified
. When this occurs, click onConfigure
next to the error and specify the location of your Java SDK (for instance,/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/
). Now try again to run theDeploy author
configuration and you should see a success message. - Navigate to the AEM Package Manager and you should see the
aem-guides-wknd.*
packages on top of the list.
- aem-front can be used to significantly speed-up your AEM front-end development workflow, as code changes will hot-reload in your browser.
docker ps
for checking the docker/container statusdocker container ls -a
shows all available docker containersdocker container rm <container id1> <container id2>
to delete a container(s).docker images
shows list of docker images available.docker rmi <image id1> <image id2>
to delete image(s)docker-compose build
to build the container with docker-compose yaml file.docker-compose up
to start runiing all the docker containers with docker-compose.docker start <container id> or docker stop <container id>
to start/stop a container.docker stop <container id> or docker stop <container id>
to start/stop a container.docker build -t aem-test .
build a docker image out of the Dockerfile at current directory."."
symbol is mandtory for docker build command.docker exec -it <container id> /bin/bash
to access docker container from terminal window. UseCTRL+D
to exit the terminal.
Inspiration and code examples are taken from the following projects: