替换docker映像文件中的占位符

I have a docker image, with many files inside. Each file have placeholders such as ${some.place.holder}.

When running the image, I would like to be able to provide a file to replace all placeholders before the RUN command is actually executed.

实现该目标的正确方法是什么?