Open chouseknecht opened 7 years ago
For anyone that wants to do the same in the meantime, I worked around this by creating a tiny "noop" role that does nothing and added it to the foreman
service described above. This has very little overhead and let's me optimize my build until a proper fix is provided.
See thread here: https://groups.google.com/forum/#!topic/ansible-container/MFhi_PZo7p8
I am wanting to create a base image defined in my container.yml that is shared by 2 or more service declarations. I was able to achieve this in the example container.yml I am including below. However, the problem comes when I try to deploy to Openshift, the image reference created results in an error on Openshift. The base image is the foreman-base which has a series of roles applied to it. The foreman container uses that foreman-base image but adds all of the service definitions. Then, the foreman-tasks container uses that same foreman-base image but runs a different service requiring everything from foreman-base.
When this gets deployed out to Openshift, the foreman container (because it has no roles and thus is not "built" by ansible-container) ends up with a deployment configuration that points at openshift-foreman-base:latest which Openshift errors on finding. The exact error is:
Failed to pull image "openshift-foreman-base:latest": Error: image library/openshift-foreman-base:latest not found
The foreman-base image does get built and pushed into the Openshift registry, so it is available but the deployment configuration ends up pointing at what seems to be the incorrect reference point.
library/openshift-foreman-base vs. '172.30.1.1:5000/openshift/openshift-foreman-base'