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.

  • bundling source code in docker containers
  • AWS Elastic Beanstalk, Dockerrun.aws.json and multiple ports on docker run [duplicate]
  • Amazon Container Registry Only with ECS?
  • Not able to read the image LABEL key and values of particular image using AWS java APIs
  • Error unmounting Docker - invalid argument
  • AWS EBS volume attachement using snapshot
  • 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?

  • How to reduce docker image size?
  • Host Volumes Not getting mounted on 'Docker-compose up'
  • How to handle shell expansion in docker-compose when setting env variables
  • How to automatically start services inside a docker container
  • Docker progress bar doesn't appear with Apache vhost
  • Running magellan on pyspark-notebook docker container
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.