Details
-
New Feature
-
Resolution: Unresolved
-
Major
-
None
-
Unknown
-
Description
Context
The XWiki images are based on the official tomcat image, which ships a full Linux distribution. The runtime image therefore contains a shell, a package manager and many OS packages that XWiki does not need. Vulnerability scanners report CVEs on these packages. An attacker who gains code execution in the container also finds a full toolset there.
Some organizations require distroless images for compliance: the runtime image must contain neither a shell nor a package manager.
Proposal
Publish a distroless variant of the XWiki image, next to the current images. The current images stay the default and keep their behavior.
The variant:
- contains no shell and no package manager;
- exists for every database the current images support (MySQL, MariaDB, PostgreSQL);
- runs as a non-root user by default.
Impacts and risks
- Configuration: the current images configure XWiki from environment variables (DB_HOST, DB_USER, CONTEXT_PATH, ...) through a shell entrypoint. The distroless variant may not support this configuration in the same way.
- Office features: the current images bundle LibreOffice for office import, export and previews. LibreOffice has a large native dependency tree that does not fit a distroless image. XWiki only supports an office server running in the same container: openoffice.serverType accepts 0 (internal) and 1 (external local), and rejects 2 (remote). Office features may therefore be unavailable in the variant.
- Troubleshooting: administrators can no longer open a shell in a running container with docker exec.
Attachments
Issue Links
- is related to
-
XDOCKER-435 Publish VEX statements for the Docker images
-
- Open
-
-
XDOCKER-436 Make the XWiki image easier to extend and to rebuild with customizations
-
- Open
-
- relates to
-
XDOCKER-8 Also offer an alpine-based image to reduce download size
-
- Closed
-
-
XDOCKER-433 Publish an SBOM and signed build provenance for the Docker images
-
- Open
-
-
XDOCKER-294 Allow not running Tomcat as root
-
- Open
-