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.
This tutorial assumes running on a Mac. Installation on Windows might differ for certain steps. The following items are required:
- Docker with at least 8GB memory allocated
- AEM installation file, named
AEM_6.2_Quickstart.jar
orAEM_6.3_Quickstart.jar
(other versions might work, but are not tested) - AEM license file, named
license.properties
- Oak runnable jar named
oak-run-*.jar
, where the*
contains the version number. Make sure the Oak version is compatible with the AEM version. - Recommended: Homebrew package manager
- Clone this repository to a local directory and put the AEM installation file, license file and Oak runnable jar file in the root.
- Put AEM packages that need to be installed during build in
./author/packages/
and./publisher/packages/
. Order of installation will be alphabetically, based on package file name. - Build the Docker images with
docker build -t aem-base -f base/Dockerfile . && docker-compose build
. This takes a couple of minutes (or more, 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 statusses are either
Active
orFragment
the AEM environment has fully started. - Navigate to http://localhost:4502 and you'll see a login screen. Login with username
admin
and passwordadmin
. Navigate to http://localhost to see the published site via the dispatcher. The publisher runs on http://localhost:4503.
Starting and stopping containers preserves AEM content. Images need to be rebuild when changing packages in the packages
directories. After stopping a container, or after a system reboot, you can be quickly up-and-running again by starting the containers with docker-compose up
.
- Install Java 8 SDK:
brew cask install java8
. - Install Maven:
brew install maven
. - Download and install IntelliJ IDEA from JetBrains or install with
brew cask install caskroom/cask/intellij-idea-ce
. - Clone the AEM We.Retail sample repository to a local directory.
- Open the folder with the AEM We.Retail 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-sample-we-retail
, 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
we.retail.*
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.
Inspiration and code examples are taken from the following projects: