Sometimes Breaking Docker Best Practices Actually Works in Your Favor | HackerNoon
Briefly

Containerization permits the independent management of each Docker container, emphasizing single responsibilities. Although multi-service containers are considered an anti-pattern, there can be justifiable reasons to create them. A Software Architecture Platform was built on Symfony, intending to integrate Structurizr. The integration posed challenges, particularly with the Structurizr CLI, which is Java-based. Installing Java directly in the PHP container streamlined operations, mitigating the need for complex SSH configurations and allowing easier CLI execution within the same container.
Managing and updating Docker containers separately is a key feature of containerization. Each container should ideally have single responsibilities. Multi-service containers violate this principle and are considered an anti-pattern.
The integration of the Structurizr into a Software Architecture Platform presented challenges, especially regarding the Java-based Structurizr CLI. Establishing an SSH connection between the PHP and Java containers added complexity.
Installing Java directly in the PHP container avoided complicated configurations and allowed the direct execution of the Structurizr CLI. Utilizing the Symfony Process component enhanced the integration's efficiency.
While the Single Responsibility Principle (SRP) is important in containerization, breaking the rule can sometimes be justified to streamline integration and improve functionality.
Read at Hackernoon
[
|
]