docker kill and capturing logs or buffers
So elasticbeanstalk when updating or changing a docker deployed image will use
docker kill in order to terminate the running docker container in order to be able to switch it for the new container that it is going to stage.
I’d like to be able to capture the logging information from that container, but the container is sent a
SIGKILL so I cannot directly have the container shutdown gracefully. I could hack the EB staging and deployment scripts to use
docker stop instead of
docker kill, but I’m confused why EB doesn’t give me the chance to clean up the app first before shutting it down.
I know it’s a long shot, but is there anyway I can hook around this in order to be able to capture this log output outside of constantly pushing it off the machine? I don’t really want to mess with amazon’s deployment scripts, but that seems like the only way to get this functionality. Anyone have any insight into this?