{"id":22973919,"url":"https://github.com/frieder/aem-container","last_synced_at":"2026-01-11T17:51:34.628Z","repository":{"id":212893188,"uuid":"732513283","full_name":"frieder/aem-container","owner":"frieder","description":"An image to run AEM SDK \u0026 Dispatcher  in a container environment","archived":false,"fork":false,"pushed_at":"2023-12-17T03:55:34.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-17T04:57:51.692Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frieder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-16T23:20:13.000Z","updated_at":"2023-12-17T04:57:58.659Z","dependencies_parsed_at":"2023-12-17T05:08:04.882Z","dependency_job_id":null,"html_url":"https://github.com/frieder/aem-container","commit_stats":null,"previous_names":["frieder/aem-container"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frieder%2Faem-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frieder%2Faem-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frieder%2Faem-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frieder%2Faem-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frieder","download_url":"https://codeload.github.com/frieder/aem-container/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246771438,"owners_count":20831060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-14T23:59:34.209Z","updated_at":"2026-01-11T17:51:34.582Z","avatar_url":"https://github.com/frieder.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AEM Container Image\n\nThis container image is designed to run Adobe Experience Manager (AEM) Cloud SDK \nwithin a container. It offers a basic AEM instance with minimal configuration. \nThe instance type (author or publish) is determined at runtime through an environment \nvariable. Additionally, it is built as a multi-architecture image (amd64, arm64) \nto ensure compatibility across various operating systems and platforms.\n\n\u003e Note: All the commands demonstrated on this page use `Podman`. However, the same \n\u003e commands can also be used with `Docker` if you prefer.\n\n# How To Use\n\nYou must first log in to your container registry. In the examples below, we will \ndemonstrate using the GitHub Container Registry.\n\n```shell\nexport TOKEN=***\nexport USER=\u003cyour github username here\u003e\nexport REGISTRY=ghcr.io\n\necho ${TOKEN} | podman login ${REGISTRY} -u ${USER} --password-stdin\n```\n\nNext, you can pull the images from your container registry. We differentiate between \na `stable` version, which represents the production installation, and the `latest`\nversion, which aligns with the Cloud Manager development environment (and potentially \nRDE). This approach allows you to test your code with the upcoming SDK version before \nupgrading your production environment.\n\n```shell\npodman pull ${REGISTRY}/${USER}/aem:stable\npodman pull ${REGISTRY}/${USER}/aem:2024.10\n\npodman pull ${REGISTRY}/${USER}/aem:latest\npodman pull ${REGISTRY}/${USER}/aem:2024.11\n```\n\nOnce you have successfully pulled the container image from the registry, you can proceed \nto start the containers. Be sure to adjust the arguments to suit your specific requirements.\n\n```shell\npodman run -d \\\n  --name author \\\n  -e TZ=\"Europe/Zurich\" \\\n  -e JVM_XMX=\"4g\" \\\n  -e JVM_META=\"512m\" \\\n  -e AEM_RUNMODE=\"author,aemdev\" \\\n  -p 4502:4500 \\\n  -p 14502:30303 \\\n  -p 24502:8686 \\\n  -v $(pwd)/volume/repo:/aem/crx-quickstart/repository \\\n  -v $(pwd)/volume/logs:/aem/crx-quickstart/logs \\\n  -v $(pwd)/volume/install:/aem/crx-quickstart/install \\\n  ${REGISTRY}/${USER}/aem:latest\n```\n\n\u003e Note: When running the container in Podman, make sure the Podman VM was\n\u003e initialized with enough resources. By default it only acquires `2GB`, which is \n\u003e not enough to run AEM.\n\u003e ```bash\n\u003e podman mmachine init --memory 16384\n\u003e ```\n\n| Port  | Description |\n|-------|-------------|\n| 4500  | HTTP port   |\n| 30303 | Debug port  |\n| 8686  | JMX port    |\n\nAfter the containers are created, you can use the following commands to start or stop them.\n\n```shell\npodman start author\npodman stop author -t 180\n```\n\nWhen stopping the AEM container, ensure that the wait time is set to an appropriate \nvalue (e.g., `180` seconds). By default, Podman/Docker only waits `10` seconds for a \ncontainer to stop before forcibly killing it. This abrupt termination can cause issues \nwith the container, so it’s important to avoid this by allowing sufficient time for the \ncontainer to shut down gracefully.\n\n# How To Build\n\nBefore building the image, ensure that the SDK quickstart JAR file is located at \n`./tmp/aem-sdk-quickstart.jar` and the license file is available at \n`./tmp/license.properties`. These files will be picked up by the Dockerfile and included \nin the image. Once these prerequisites are met, you can build the image using the \nfollowing command.\n\n```shell\nTEMURIN_VERSION=11.0.25_9-jre\n\npodman build \\\n  --platform linux/amd64,linux/arm64 \\\n  --build-arg PKG=\"curl wget\" \\\n  --build-arg LOCALE=\"en_GB.UTF-8\" \\\n  --build-arg TEMURIN_VERSION=\"${TEMURIN_VERSION}\" \\\n  --manifest ${REGISTRY}/${USER}/aem:2024.11 \\\n  .\n```\n\nAll build arguments are optional. The table below provides a quick overview of the \navailable options:\n\n| Argument        | Description                                                                                          | Default |\n|-----------------|------------------------------------------------------------------------------------------------------|---------|\n| PKG             | A space-separated list of OS packages to install                                                     |         |\n| LOCALE          | Set the system locate.                                                                               | en_GB.UTF-8 |\n| TEMURIN_VERSION | The [Temurin container image](https://hub.docker.com/_/eclipse-temurin) to run AEM on. | 11.0.25_9-jre |\n\nSome arguments in [scripts/start.sh](scripts/start.sh) are hard-coded and applied to both \nthe JVM and AEM, and they cannot be modified directly. If these settings don't suit your \nneeds, you can either customize the bash script to your preferences or make the arguments \nconfigurable as build parameters.\n\n\u003e The command above creates a multi-architecture image supporting both `amd64` and `arm64`\n\u003e architectures. If you are building a similar image using Docker, consider using \n\u003e [Docker Buildx](https://docs.docker.com/engine/reference/commandline/buildx/)\n\u003e for multi-architecture support.\n\nThe last action is to push the container image to your container registry.\n\n```shell\npodman manifest push ${REGISTRY}/${USER}/aem:2024.11\npodman manifest push ${REGISTRY}/${USER}/aem:2024.11 ${REGISTRY}/${USER}/aem:latest\n```\n\n## Build Pipeline Example\n\nThe pipeline scripts at [.github/workflows/podman.yml](.github/workflows/podman.yml)\nand [.github/workflows/docker.yml](.github/workflows/docker.yml)\nshow a GH build pipeline that pulls data from a remote artifact repository (Nexus OSS) \nand prepares them for the use in the build pipeline. The following JSON snippet \nillustrates the structure of version.json. This file is downloaded first and is used \nto determine the paths of the files to be retrieved:\n \n```json\n{\n  \"license\": \"/aem/lic/license.properties\",\n  \"stable\": {\n    \"jdk\": \"11.0.25_9-jre\",\n    \"sdk\": \"/aem/sdk/bin/aem-sdk-2024.10.18459.20241031T210302Z-241000.zip\",\n    \"pkg\": [\n      \"/aem/sdk/packages/universal-editor-service-vprod-20241118150153.zip\"\n    ]\n  },\n  \"latest\": {\n    \"jdk\": \"11.0.25_9-jre\",\n    \"sdk\": \"/aem/sdk/bin/aem-sdk-2024.11.18598.20241113T125352Z-241100.zip\",\n    \"pkg\": [\n      \"/aem/sdk/packages/aem-guides-wknd.all-3.2.0.zip\",\n      \"/aem/sdk/packages/aem-guides-wknd.ui.content.sample-3.2.0.zip\",\n      \"/aem/sdk/packages/universal-editor-service-vprod-20241118150153.zip\"\n    ]\n  }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrieder%2Faem-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrieder%2Faem-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrieder%2Faem-container/lists"}