Tools
Reducing the Footprint of the Docker image of IRIS Community Edition
2025-12-22
0 views
admin
⚠️ Disclaimer ## Why a Lightweight IRIS? ## Image Footprint Comparison ## Analyzing Image Layers with Dive ## Before Optimization: Vanilla IRIS Community Image ## After Optimization: IRIS Light Image ## How the IRIS Light Image Is Built ## 1. Disable Components in Configuration ## 2. Remove Unused Packages from Inside IRIS ## 3. Stub Classes ## 4. Clean Databases ## 5. File System Cleanup ## 6. Copy Cleaned Contents to a Fresh Ubuntu Base ## Outcome ## Important Limitations ## Conclusion The most upvoted idea on the InterSystems Ideas Portal—garnering 74 votes—requests a lightweight version of IRIS. While the platform has grown into a powerful data engine, many projects require only its SQL database capabilities. This article demonstrates how to build an unofficial, compact IRIS Community Edition image focused solely on core database functionality, reducing the image size by over 80%. This project produces an unofficial, experimental image of InterSystems IRIS Community Edition. While IRIS today includes rich functionality—interoperability, analytics, machine learning, system management, etc.—many projects only require its core SQL capabilities. The official Community Edition Docker image is approximately: IRIS Light reduces that to: This makes it suitable for: The official IRIS Community Edition images typically occupy 3.5–3.8 GB on disk, with compressed sizes around 1.1 GB: By contrast, the stripped-down "IRIS Light" image created via this approach is approximately 8× smaller in compressed size: To understand and optimize the IRIS Community Edition image, we used dive, a tool for inspecting Docker image layers and identifying inefficiencies. The screenshot below shows the analysis of the official iris-community:latest-em image. One of the largest layers weighs in at 882 MB, containing Java, system libraries, and other runtime components not strictly required for SQL-only workloads. And the biggest one 1.5GB, which contains mostly IRIS itself By removing unneeded packages and compacting internal IRIS storage, the final image fits into a single 320 MB layer, achieving dramatic size reduction. The process follows a multi-stage Dockerfile, starting from the standard iris-community:latest-em base. Key steps include: Using ObjectScript within an IRIS session: Some required classes (e.g., for startup) are replaced with minimal no-op implementations if needed. Compact, defragment key databases to reduce size The final image is built on top of ubuntu:24.04, includes only necessary files and tools, and uses tini as PID 1. The resulting image is around: This makes it highly suitable for: IRIS Light is a streamlined, community-driven Docker image for InterSystems IRIS, offering significant reductions in size and complexity for database-centric use cases. While not officially supported, it provides a foundation for experimentation, rapid prototyping, and where full IRIS capabilities are not needed. Users are encouraged to review the Dockerfile, adapt it to their own needs, and understand the implications of removing core platform features. Users are encouraged to tailor the Dockerfile further to suit their own operational and security constraints. The full build process is transparent and reproducible using only public Docker base images. This project available here IRIS Community Light docker images available on Docker Hub Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse COMMAND_BLOCK:
$ docker images containers.intersystems.com/intersystems/iris-community
IMAGE ID DISK USAGE CONTENT SIZE
containers.intersystems.com/intersystems/iris-community:latest-cd 14c6314edcc5 3.8GB 1.17GB
containers.intersystems.com/intersystems/iris-community:latest-em 4c25627895eb 3.52GB 1.01GB
containers.intersystems.com/intersystems/iris-community:latest-preview 424e87dbb7d8 3.81GB 1.17GB COMMAND_BLOCK:
$ docker images caretdev/iris-community-light
IMAGE ID DISK USAGE CONTENT SIZE
caretdev/iris-community-light:latest-cd ce5c2d7fa173 583MB 148MB
caretdev/iris-community-light:latest-em fd33a51a0e81 575MB 144MB
caretdev/iris-community-light:latest-preview f10c714117da 583MB 148MB - Not supported or endorsed by InterSystems.
- Use at your own risk. The modifications remove core platform features and may break compatibility with tools, APIs, and expected behaviors.
- No warranties or guarantees apply, including fitness for production use.
- Intended only for educational and experimental purposes by advanced users. - Disk usage: 3.5–3.8 GB
- Compressed size: ~1.1 GB - Disk usage: ~575–583 MB
- Compressed size: ~144–148 MB - Microservice or containerized SQL use
- CI pipelines with faster startup and pull
- Horizontal scaling where full features are unnecessary - Turn off WebServer, System Management Portal, and Ensemble in iris.cpf. - Delete packages: %SYS.ML, DeepSee, Interop, OAuth2, Net, Report, and more.
- Keep only essential system libraries (e.g., %Library, %SQL, %SYSTEM). - Development tools
- Web stack and CSP
- Interoperability libraries
- Python/Java support
- Locale data, logs, temporary files, ODBC/JDBC drivers - Compressed size: ~144–148 MB
- Uncompressed disk usage: ~570–580 MB
- SQL functionality: verified using the sqlalchemy-iris test suite (619 passed, 912 skipped, 0 failed) - Minimal SQL services
- Lightweight dev/test containers
- Embedded or edge deployment scenarios
- Stateless horizontally scaled architectures - No Management Portal or Web ServicesThe entire CSP/web stack is removed.
- No Interoperability, DeepSee, iKnow, or Machine LearningThese subsystems are explicitly deleted.
- No internal or external supportInterSystems provides no guarantees for this image. Compatibility and upgrade behavior are undefined.
- Future IRIS versions may change startup requirementsInternal dependencies on removed packages or files may prevent future versions from working with this approach.
how-totutorialguidedev.toaimachine learningmlubuntuserverdockerpythondatabase