I want to dockerize an application and run into the following problem:
- Container A:
- Installed RPM1
- Container B:
- Installed RPM2
In RPM2 in the postinstall script it is checking that the Service in Container A is running with an endless while loop
as it is trying to register itself there and updating the config. (A is some kind on central config-server)
- When i use docker-compose the Container A isnt started directly but only after all builds are complete, so build of Container B fails. Of course i have set depends_on. Is there something available to do that ?
Other solutions i thought of:
- Use a shellscript with docker to build and startup Container A before building for Container B starts.
- Two Docker-Compose files, one for each container, but i would prefer one and use the container-linking, networking etc.
- Install the RPM2 with the --noscripts parameter and then put the postinstall into a RUN command of the Dockerfile. (very ugly)
- get the rpm changed
Any other ideas or tricks welcome. Thanks !