Alfresco platform is built using containerization technology. Alfresco can utilize containerization platforms like Docker, which provide the necessary tools and infrastructure to create, manage, and run containers.
Alfresco Community Docker Images are built with Docker and published in Docker Hub Registry. ACS platform includes a set of containers that are deployed together to provide Content Services.
Docker Images are produced and used in Alfresco development in several ways:
In addition to the use of Docker products, this blog post explores the alternative to use Podman for containers management.
Docker alternatives (some)
Despite there are many alternatives to manage containers, the most used products are Podman (by Red Hat) and Rancher (by SUSE). Both products are using QEMU for virtualization purposes and both products are Open Source projects licensed with Apache License 2.0.
Podman includes a set of tools to perform different containers operations:
Alternatively, by combining Rancher container management capabilities with Lima lightweight virtualization and QEMU hardware emulation, container clusters can be run across different architectures and environments.
Both products can be integrated with Alfresco development workflow, despite we're exploring only Podman alternative in this blog post.
Some technical differences between Podman and Docker
Docker and Podman are used to download pre-built Container Images from a Registry, to build locally Container Images and to run Containers inside a Container Runtime enviroment.
However, they differ in some key aspects:
Since we are evaluating the use of Podman only for Alfresco development purposes, these differences don't impact much in the common workflow.
Installing Podman on Mac
Follow official documentation to install Podman in Windows or some Linux distribution.
For Mac, Podman is provided through Homebrew. Once you have set up brew, you can use the brew install command to install Podman products.
1. Install podman (as replacement of docker command)
$ brew install podman
2. Create podman machine with 5 CPUs and 16 GB of RAM
$ podman machine init --cpus 5 --memory=16384 $ podman machine start $ podman machine ls NAME VM TYPE CPUS MEMORY podman-machine-default* qemu 5 17.18GB
3. Install podman-compose (as replacement of docker compose)
$ brew install podman-compose
4. Install podman-desktop (as replacement of Docker Desktop app)
$ brew install podman-desktop
5. Since Podman provides a command line interface similar to that of Docker, some aliases can be defined to ensure the compatibility with scripting files and other existing resources.
$ vi ~/.zshrc alias docker=podman alias docker-compose=podman-compose $ source ~/.zshrc
Testing Podman features
Let's create a simple extension for alfresco-search-services container that enables cross locale indexing to test the building process.
$ cat Dockerfile FROM alfresco/alfresco-search-services:2.0.7 RUN sed -i '/^bash.*/i sed -i "'"/alfresco.cross.locale.datatype/s/^#//g"'" $DIST_DIR/solrhome/conf/shared.properties\n' \ ${DIST_DIR}/solr/bin/search_config_setup.sh;
Building command is equivalent to docker one and it's working as expected.
$ docker build . -t podman-search:2.0.7 Successfully tagged localhost/podman-search:2.0.7 $ docker image ls podman-search localhost/podman-search 2.0.7 b36544bbcf8a
Creating an Alfresco Docker Compose template can be done using the Alfresco Docker Installer command.
$ yo alfresco-docker-installer ? Which ACS version do you want to use? 7.4 ? Do you want to deploy Alfresco in ARCH64 computer (like Apple Silicon)? No ? How may GB RAM are available for Alfresco (16 is minimum required)? 16 ? Do you want to use HTTPs for Web Proxy? No ? What is the name of your server? localhost ? Choose the password for your admin user admin ? What HTTP port do you want to use (all the services are using the same port)? 8080 ? Do you want to use FTP (port 2121)? No ? Do you want to use MariaDB instead of PostgreSQL? No ? Are you using different languages (this is the most common scenario)? Yes ? Do you want to search in the content of the documents? Yes ? Would you like to use Shared Secret or HTTPs for Alfresco-SOLR communication? secret ? Do you want to use the Events service (ActiveMQ)? No ? Do you want to create an internal SMTP server? No ? Do you want to create an internal LDAP server? No ? Select the addons to be installed: ? Are you using a Windows host to run Docker? Yes ? Do you want to use a start script? No ? Do you want to get the script to create host volumes? No
Once Docker Compose is ready, starting ACS platform can be achieved using default docker command.
$ docker-compose up --build --force-recreate
Podman Desktop, in the same way Docker Desktop does, provides access to container resources (like images, containers and volumes).
When using AARCH64 processors (like Apple Silicon), Docker Desktop adds an orange label to AMD64 containers. That makes easier to identify Docker Images that need to be re-built or that may be working wrong. Despite Podman Desktop doesn't provide this option, using the Container Terminal allows to check container architecture.
Building Container Images for AARCH64 with Podman
Since Podman and Docker don't share the Local Container Registry, it's required to build AARCH64 Images by using podman. The project Alfresco Dockerx Builder provides a command line tool to build Alfresco AARCH64 Images and supports the use of podman to build these images. Just add the podman argument to store the image on the Local Container Registry for Podman.
$ ./buildx.sh podman search 2.0.7 $ docker image ls alfresco-search-services localhost/alfresco/alfresco-search-services 2.0.7 3072cb241cca
Final remarks
From the experience adquired in this simple test, both Docker and Podman can be used effectively for Alfresco development. So consider your familiarity with the tools, preferred workflow, ecosystem support, security requirements, and any specific performance considerations to make the best choice for your Alfresco development needs.
Video recording
Additional details and live demo are available in this video recording.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.