Skip to content

Graceful shutdown from docker container image #918

@at-seavus

Description

@at-seavus

Describe the bug

Docker container image does not exit gracefully no matter what I do to it.
I am running a kubernetes pod in which I wanted to crawl a website. This POD has three containers in it and after they are done with preparing the environment for crawl and actually crawl the website I want all of my containers exit with exit code 0 except for the main container (the one running pywb). I tried adding some shell script code to send SIGTERM, SIGINT or similar to it but nothing stops it properly and gracefully shuts it down, I was wondering if this functionality is present since I didn't find anything in the documentation about it. Kind regards

Steps to reproduce the bug

Create a kubernetes pod with 2 or more containers in it
pywb container can use args: ["wayback", "--record", "--live", "-a"] to start the live server
Set shareProcessNamespace: true in your POD definition
Start the POD and try killing the wayback process from another POD
pywb container exits with exit code 137 or similiar (depending on the signal) and restarts the container

Expected behavior

Being able to gracefully shutdown the container

Screenshots

Environment

  • OS: [e.g. iOS] Ubuntu 20.04 running kubernetes in minikube
  • Browser [e.g. chrome, safari] Firefox
  • Version [e.g. 22] 131.0.3 (64-bit)

Additional context

This isn't so much of a bug report because the application is theoretically working fine, I just want to know if it is possible to exit it gracefully. Kind regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions