How can OpenShift container learn its image ID?
问题 I would like to add a configuration option to a proprietary, PostgreSQL-based Docker image for OpenShift 3.9 in the form of a template variable INITDB . The image provides a database that is backed by persistent storage, and from now on the database should only be initialized when that variable (flag) is set. The image is built with OpenShift's Docker build strategy and PostgreSQL's initdb is called in the Dockerfile 's ENTRYPOINT script: so it executes whenever the container starts up.