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

Remove the container in case of detach mode #427

Closed
wants to merge 1 commit into from

Conversation

milanbalazs
Copy link
Contributor

Currently if the detach=True and remove=True parameters are specified the container is not deleted.

Reproduce the issue:

from podman import PodmanClient

uri = "unix:///run/user/1000/podman/podman.sock"

with PodmanClient(base_url=uri) as client:
    c = client.containers.run("nginx", deatch=True, remove=True, command="/bin/false")

    print(c.status)

With this change if the above parameters are provided then the container object is returned and the container removing (wait method is included) is started on a separated thread.

Fix for:

Copy link
Contributor

openshift-ci bot commented Sep 14, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: milanbalazs
Once this PR has been reviewed and has the lgtm label, please assign rhatdan for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@milanbalazs
Copy link
Contributor Author

milanbalazs commented Sep 14, 2024

This PR includes this #426 PR. Probably it would be nice to rebase this PR to master branch after merge the previous PR.

@inknos inknos self-requested a review September 17, 2024 13:22
@milanbalazs milanbalazs closed this by deleting the head repository Sep 26, 2024
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

Successfully merging this pull request may close these issues.

1 participant