Skip to content
Piergiorgio Lucidi edited this page Nov 30, 2026 · 2 revisions

Docker Images

Official Apache ManifoldCF™ container images are published on Docker Hub under apache/manifoldcf. Starting with 2.32, the project ships two image variants from the same repository, distinguished by tag.

See also: Spring Boot & Modern Admin Console · How to Build and Deploy · Downloads · Security Policy


Image Variants & Tags

Variant Tags Dockerfile Runtime Best for
Classic (default) apache/manifoldcf:<version>, apache/manifoldcf:latest Dockerfile / src/main/docker/JDK-25/Dockerfile Embedded Jetty 12.1 (dist/example/start.sh) Existing deployments, multi-process (file / ZooKeeper) examples, bind-mounted dist/example configuration
Spring Boot (2.32+) apache/manifoldcf:<version>-spring-boot, apache/manifoldcf:spring-boot Dockerfile.spring-boot / src/main/docker/spring-boot/Dockerfile Spring Boot 4.2 executable WAR (dist/example-spring-boot/start.sh) New cloud-native deployments, Kubernetes, Modern Admin Console (/ui/), REST API v2 / OpenAPI / GitOps

Both variants are built on eclipse-temurin:25-jre-resolute, published as multi-arch images (linux/amd64, linux/arm64/v8), run as the non-root manifoldcf user (UID 100001, GID 100002), and expose port 8345.

Note

latest continues to point at the classic variant so existing users are unaffected. The Spring Boot variant is opt-in via the -spring-boot tag suffix.

What Each Image Contains

Content Classic Spring Boot
connector-lib/, connector-common-lib/, connector-lib-proprietary/, connectors.xml, file-resources/ ✅ ✅
web/war/mcf-crawler-ui.war, mcf-api-service.war, mcf-authority-service.war, mcf-combined-service.war ✅ —
lib/ (Jetty runner + core jars) ✅ —
example/, multiprocess-file-example/, multiprocess-zk-example/, obfuscation-utility/ ✅ —
web/war/mcf-spring-boot-app.war (81 MB, HSQLDB + PostgreSQL JDBC drivers bundled) — ✅
example-spring-boot/ (start.sh, properties.xml, application.properties, logging.xml) — ✅
Docker HEALTHCHECK on /actuator/health — ✅
Approximate image size ~970 MB ~600 MB

Quick Start

Classic Jetty Image

docker pull apache/manifoldcf:2.31
docker run -d -p 8345:8345 --name manifoldcf apache/manifoldcf:2.31

Open http://localhost:8345/mcf-crawler-ui.

Spring Boot Image (2.32+)

docker pull apache/manifoldcf:2.32-spring-boot
docker run -d -p 8345:8345 --name manifoldcf-spring-boot apache/manifoldcf:2.32-spring-boot
Endpoint URL Auth
Modern Admin Console http://localhost:8345/ui/ Yes
Classic Crawler-UI http://localhost:8345/index.jsp Yes
Swagger UI http://localhost:8345/mcf-api-service/swagger-ui Yes (HTTP Basic)
OpenAPI 3.x (JSON / YAML) http://localhost:8345/api/v2/openapi · /api/v2/openapi.yaml Yes (HTTP Basic)
REST API v2 http://localhost:8345/api/v2/* Yes (HTTP Basic)
REST API v1 (legacy) http://localhost:8345/mcf-api-service/json/* Yes
Authority Service http://localhost:8345/mcf-authority-service/UserACLs Network-restrict
Health probes http://localhost:8345/actuator/health · /api/v2/health Open

Warning

Both images start with default admin / admin credentials. Change them (mount your own properties.xml) and deploy behind TLS before exposing the container outside a local test environment. See Security Policy.


Configuring the Spring Boot Image

Environment Variables

Variable Default Purpose
MCF_PORT 8345 HTTP listen port (server.port=${MCF_PORT:8345}) and HEALTHCHECK target
SERVER_PORT — Standard Spring Boot override; takes precedence over MCF_PORT
MCF_JAVA_OPTS -Xms256m -Xmx1024m JVM options passed by start.sh
docker run -d -p 9090:9090 \
  -e MCF_PORT=9090 \
  -e MCF_JAVA_OPTS="-Xms512m -Xmx2g" \
  --name manifoldcf-spring-boot \
  apache/manifoldcf:2.32-spring-boot

Custom properties.xml (e.g. PostgreSQL)

The Spring Boot WAR bundles the PostgreSQL JDBC driver, so switching from embedded HSQLDB only requires mounting a custom properties.xml:

<configuration>
  <property name="org.apache.manifoldcf.databaseimplementationclass" value="org.apache.manifoldcf.core.database.DBInterfacePostgreSQL"/>
  <property name="org.apache.manifoldcf.postgresql.hostname" value="postgres"/>
  <property name="org.apache.manifoldcf.dbsuperusername" value="postgres"/>
  <property name="org.apache.manifoldcf.dbsuperuserpassword" value="change-me"/>
  <property name="org.apache.manifoldcf.login.name" value="admin"/>
  <property name="org.apache.manifoldcf.login.password" value="change-me"/>
  <property name="org.apache.manifoldcf.connectorsconfigurationfile" value="../connectors.xml"/>
  <property name="org.apache.manifoldcf.fileresources" value="../file-resources"/>
  <libdir path="../connector-lib"/>
  <libdir path="../connector-common-lib"/>
  <libdir path="../connector-lib-proprietary"/>
</configuration>
docker run -d -p 8345:8345 \
  -v /path/to/properties.xml:/usr/share/manifoldcf/example-spring-boot/properties.xml:ro \
  --name manifoldcf-spring-boot \
  apache/manifoldcf:2.32-spring-boot

Additional Spring Boot settings can be supplied by mounting /usr/share/manifoldcf/example-spring-boot/application.properties, or by passing arguments, e.g. docker run ... apache/manifoldcf:2.32-spring-boot ./start.sh --server.port=9090.

Health Checks & Graceful Shutdown

  • The image declares HEALTHCHECK against /actuator/health (30s interval, 60s start period), so docker ps reports healthy once the AgentsDaemon is running.
  • For Kubernetes, use /actuator/health/liveness and /actuator/health/readiness (both unauthenticated).
  • start.sh uses exec java ..., so the JVM runs as PID 1 and receives SIGTERM directly; the ManifoldCFLifecycle SmartLifecycle bean stops the AgentsDaemon cleanly on docker stop.

Building the Images Locally

Both Dockerfiles expect a populated dist/ directory in the build context.

# 1. Build the distribution (includes the Spring Boot WAR and dist/example-spring-boot)
ant make-core-deps make-deps build

# 2a. Classic Jetty image
docker build -f Dockerfile --build-arg MCF_VERSION=2.32-SNAPSHOT -t apache/manifoldcf:2.32-SNAPSHOT .

# 2b. Spring Boot image
docker build -f Dockerfile.spring-boot --build-arg MCF_VERSION=2.32-SNAPSHOT -t apache/manifoldcf:2.32-SNAPSHOT-spring-boot .

Tip

The classic Dockerfile copies only the four classic WARs explicitly, so mcf-spring-boot-app.war in dist/web/war/ does not bloat the classic image.

Important

The root Dockerfiles and their src/main/docker/ counterparts must be kept in sync: Dockerfile ↔ src/main/docker/JDK-25/Dockerfile and Dockerfile.spring-boot ↔ src/main/docker/spring-boot/Dockerfile. The release-candidate workflow builds from the root files, while the manual Docker publishing workflow sparse-checks-out the src/main/docker/ copies.


CI/CD Workflows

flowchart LR
    PR["Pull request / tag"] --> CI["ci.yml"]
    CI --> AntBuild["ant build test"]
    AntBuild --> SBTests["ant test-spring-boot-app"]
    SBTests --> ClassicBuild["docker build Dockerfile"]
    ClassicBuild --> SBBuild["docker build Dockerfile.spring-boot + smoke test"]
    RC["create-release-candidate.yml"] --> PushBoth["Push :latest, :ver-RC and :spring-boot, :ver-RC-spring-boot"]
    Manual["create-docker-image.yml"] --> Variant{"variant input"}
    Variant -->|"all / standard"| PushClassic["Push :ver and :latest"]
    Variant -->|"all / spring-boot"| PushSB["Push :ver-spring-boot and :spring-boot"]
Loading

ci.yml — Pull Request & Tag Validation

Runs on pull requests to trunk, on tag pushes, and on demand:

  1. ant make-core-deps make-deps build test
  2. ant test-spring-boot-app — Spring Boot unit, controller, and REST API v2 integration tests (live-server / browser E2E suites are gated behind -Dmcf.ui.baseUrl / -Dmcf.ui.browserE2E and are skipped in CI).
  3. Validate Classic Docker Image Build — docker build -f Dockerfile.
  4. Validate Spring Boot Docker Image Build and Smoke Test — builds Dockerfile.spring-boot, starts the container, and asserts /actuator/health, /api/v2/health, /ui/index.html, and /api/v2/openapi respond successfully (container logs are printed on failure).

create-docker-image.yml — Manual Docker Hub Publishing

workflow_dispatch inputs:

Input Values Description
release 2.32-JDK-25, 2.31-JDK-25, 2.30-JDK-21, … Release whose official -bin.tar.gz is downloaded from dlcdn.apache.org (older releases are rebuilt from their release-* branch)
variant all (default), standard, spring-boot Which image(s) to publish
  • With all, the workflow detects whether the downloaded distribution contains example-spring-boot/ and web/war/mcf-spring-boot-app.war. If not (any release before 2.32), the Spring Boot build is skipped automatically, so re-publishing older releases is safe.
  • Choosing spring-boot for a release without the Spring Boot distribution fails fast with an explicit error.

create-release-candidate.yml — Release Candidates

For each RC (input: releasecandidatetag, e.g. RC0) the workflow now also:

  • Stamps <version>-SNAPSHOT → <version> in framework/example-spring-boot/properties.xml and framework/spring-boot-app/src/main/resources/properties.xml before ant image, so both the -bin archives and the images carry the release version.
  • Stamps SNAPSHOT → <RC tag> in both Dockerfile and Dockerfile.spring-boot and commits all stamped files to the release-<version>-<RC> branch.
  • Publishes both apache/manifoldcf:latest / apache/manifoldcf:<version>-<RC> and apache/manifoldcf:spring-boot / apache/manifoldcf:<version>-<RC>-spring-boot.

Choosing a Variant

If you… Use
Already run apache/manifoldcf:2.31 (or earlier) and bind-mount example/ files Classic
Need the multi-process file or ZooKeeper examples inside the container Classic
Want the Modern Admin Console, REST API v2, Swagger UI, or Configuration-as-Code GitOps Spring Boot
Deploy on Kubernetes and want built-in liveness/readiness probes and a smaller image Spring Boot
Connect to PostgreSQL without customizing the classpath Either (both include the PostgreSQL driver)

Related Pages

Clone this wiki locally