I’ve read that docker issues a SIGTERM whenever it stops a docker container. I would like to know if it is possible to catch via shell script if docker host receives a docker run command instead. If it is possible, will you be able to provide ways how to catch it?
After reading from docker documentation, the docker daemon listens to /var/run/docker.sock or tcp at port 2375. I’ve noticed that only one can listen and verified this through the internet. Are there any ways to log requests coming from either the unix socket or port?