forked from containerd/nerdctl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: not to be deleted a container created with --rm when detatching
In the current implementation, detaching from a container started with `nerdctl run --rm ...` unexpectedly removes it. The behaviour before this modification is as follows. ``` > nerdctl run --rm -it --detach-keys=ctrl-a,ctrl-b --name test alpine / # INFO[0002] read detach keys > nerdctl ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ``` When the same operaton is performed in the Docker CLI, the container will not be deleted. This issue is reported in the following: - containerd#3568 Therefore, this commit resolves this behaviour of a container not being deleted on detachment. Note that the behaviour after this modification is as follows. ``` > nerdctl run --rm -it --detach-keys=ctrl-a,ctrl-b --name test alpine / # INFO[0010] read detach keys > nerdctl ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 46f4c829e5cc docker.io/library/alpine:latest "/bin/sh" 15 seconds ago Up test ``` Signed-off-by: Hayato Kiwata <[email protected]>
- Loading branch information
Showing
2 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters