After searching on the internet (https://hub.docker.com/_/centos/), I notice docker image based on centos7 requires some setup in order to get systemd working. Following that instruction, basically I can build the image without a problem.
However, with that configuration I can't execute startup script after CMD ["/usr/sbin/init"]. What additional steps are required in order to execute script after /usr/sbin/init?
Thanks
Docker to execute startup script after init
Re: Docker to execute startup script after init
Try using only your startup script as CMD[] and put /usr/sbin/init first in startup script.