Abstract

A method for container image optimization comprises receiving source container image and user-defined parameters, including one or more application directories and iteration threshold. Metadata is extracted from source image, followed by comprehensive dependency analysis that identifies operating system and application runtime requirements, including libraries, packages, symlinks, and technology-specific dependencies. An artificial intelligence engine assists in technology identification and dependency assessment. An optimized Dockerfile is generated based on analysis and refined through deterministic validation and correction rules. The optimized Dockerfile is used to build reduced container image. If build fails, diagnostic processing reproduces failure within source image environment, analyzes root cause using artificial intelligence and rule-based reasoning, and updates dependency analysis to improve subsequent Dockerfile generation. The optimization cycle iteratively repeats until successful build is achieved or predefined iteration limit is reached. A report is generated, upon successful completion, indicating image optimization results, including size reduction metrics and build validation outcomes.

Creative Commons License

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.

Share

COinS