So in general, its possible for you to pull the entrypoint or default command scripts from any docker image that you have. Remember docker images really are just tarballs with metadata, its the metadata that docker uses to figure out how to build and run the container. Docker lets you inspect that metadata, and pull content out of containers.
Bad news is right now in the Sensu 5.x series we aren’t using a docker entrypoint. We’re making use of a wrapper script around the sensu-backend specifically that has the logic needed to do the init. Good news is, you can still inspect the image and figure it out.
Here’s what I just did to find the wrapper script:
$ docker image inspect sensu/sensu:5.21.0 | jq ..ContainerConfig
Entrypoint is null, but the default CMD is not so I can copy out the default command
$ id=$(docker create sensu/sensu:5.21.0)
$ docker cp -L $id:/usr/local/bin/sensu-backend /tmp/sensu-backend
and now I have the container’s sensu-backend wrapper script on my docker host in /tmp/
In general if you want to get the entrypoint script you can follow a procedure like this:
pull the image
inspect the local copy of the image for the entry point script
$ docker image inspect whateverimage:tag | jq ..ContainerConfig.Entrypoint
This will give you an array,
create a container from the image
$ id=$(docker create whateverimage:tag)
copy the content you need out of the local container using that container id.
$ docker cp $id:/path/src/content /tmp/content
The better news is we are reworking the plumbing for the docker files and planning on moving the logic into an entrypoint and make it available as part of the OSS in the upcoming 6.x series. Watch out for that real soon now.
I hope this helps.