Guest user asked:
I’d like to build a docker image which will the base of my containers, but I’d like to prevent creating a container directly from it.
Is it possible?
You can’t prevent creating a container from your images, but you can prevent the container from running anything. Simply don’t include anything runnable in the container.
An example of a base image that does this is
centurylink/ca-certs (which is horribly out of date; don’t use it for its intended purpose). It is based on
scratch and its only content is a CA certificate bundle file. It is not possible to run anything from this container as it contains no scripts or executables.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.