Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

container.stop and container.restart are missing the signal argument #3304

Open
Kale-Ko opened this issue Dec 13, 2024 · 1 comment
Open

Comments

@Kale-Ko
Copy link

Kale-Ko commented Dec 13, 2024

Both stop and restart have supported customizing the signal that is sent to the container since api version v1.42 but it seems that it has not been added here. It would be very helpful if it could be added.

I would have a crack at it but I am not very familiar with writing unit tests. I saw that it is implemented for kill so it might not be too hard but I'm not sure.

@Kale-Ko
Copy link
Author

Kale-Ko commented Dec 13, 2024

I did go ahead and get it working but again I'm not sure how to do unit tests
main...Kale-Ko:docker-py:main

I tested it on a bash container with traps set up for SIGINT, SIGTERM, and SIGKILL and it gives the same results as docker stop -s {signal} {container} so I'd say it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant