Skip to content

Manually handle graceful shutdown when SIGTERM is sent #320

@snoopcheri

Description

@snoopcheri

Hi

I'm running dind as a sidecar container in a Kubernetes pod. And I'm trying to make sure that the dind container doesn't shutdown immediately when receiving a SIGTERM, but waits for the main container to gracefully shutdown first.

In order to achieve this, I'm overwriting the entry point with a command /bin/sh -c <some script>, where <some script> registers a trap handler which does the synchronization. But it seems that busybox simply ignores SIGTERM. And since no bash is installed, I don't see any way around this.

I guess I could simply create a new image based on dind and install bash. But working with the dind image directly would be the preferred way.

Do you see a way how I could achieve this?

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