github.com/containers/podman/v5@v5.1.0-rc1/docs/source/markdown/podman-stop.1.md.in (about)

     1  % podman-stop 1
     2  
     3  ## NAME
     4  podman\-stop - Stop one or more running containers
     5  
     6  ## SYNOPSIS
     7  **podman stop** [*options*] *container* ...
     8  
     9  **podman container stop** [*options*] *container* ...
    10  
    11  ## DESCRIPTION
    12  Stops one or more containers using container IDs or names as input. The **--time** option
    13  specifies the number of seconds to wait before forcibly stopping the container after the stop command
    14  is issued to the container. The default is 10 seconds. By default, containers are stopped with SIGTERM
    15  and then SIGKILL after the timeout. The SIGTERM default can be overridden by the image used to create the
    16  container and also via command line when creating the container.
    17  
    18  ## OPTIONS
    19  
    20  #### **--all**, **-a**
    21  
    22  Stop all running containers.  This does not include paused containers.
    23  
    24  @@option cidfile.read
    25  
    26  Command does not fail when *file* is missing and user specified --ignore.
    27  
    28  #### **--filter**, **-f**=*filter*
    29  
    30  Filter what containers are going to be stopped.
    31  Multiple filters can be given with multiple uses of the --filter flag.
    32  Filters with the same key work inclusive with the only exception being
    33  `label` which is exclusive. Filters with different keys always work exclusive.
    34  
    35  Valid filters are listed below:
    36  
    37  | **Filter** | **Description**                                                                  |
    38  |------------|----------------------------------------------------------------------------------|
    39  | id         | [ID] Container's ID (CID prefix match by default; accepts regex)                 |
    40  | name       | [Name] Container's name (accepts regex)                                          |
    41  | label      | [Key] or [Key=Value] Label assigned to a container                               |
    42  | exited     | [Int] Container's exit code                                                      |
    43  | status     | [Status] Container's status: 'created', 'exited', 'paused', 'running', 'unknown' |
    44  | ancestor   | [ImageName] Image or descendant used to create container                         |
    45  | before     | [ID] or [Name] Containers created before this container                          |
    46  | since      | [ID] or [Name] Containers created since this container                           |
    47  | volume     | [VolumeName] or [MountpointDestination] Volume mounted in container              |
    48  | health     | [Status] healthy or unhealthy                                                    |
    49  | pod        | [Pod] name or full or partial ID of pod                                          |
    50  | network    | [Network] name or full ID of network                                             |
    51  | until      | [DateTime] Containers created before the given duration or time.                 |
    52  
    53  @@option ignore
    54  
    55  @@option latest
    56  
    57  @@option time
    58  
    59  ## EXAMPLES
    60  
    61  Stop the specified container via its name.
    62  ```
    63  $ podman stop mywebserver
    64  ```
    65  
    66  Stop the container via its id.
    67  ```
    68  $ podman stop 860a4b235279
    69  ```
    70  
    71  Stop multiple containers.
    72  ```
    73  $ podman stop mywebserver 860a4b235279
    74  ```
    75  
    76  Stop the container identified in the cidfile.
    77  ```
    78  $ podman stop --cidfile /home/user/cidfile-1
    79  ```
    80  
    81  Stop the containers identified in the cidfiles.
    82  ```
    83  $ podman stop --cidfile /home/user/cidfile-1 --cidfile ./cidfile-2
    84  ```
    85  
    86  Stop the specified container in 2 seconds.
    87  ```
    88  $ podman stop --time 2 860a4b235279
    89  ```
    90  
    91  Stop all running containers.
    92  ```
    93  $ podman stop -a
    94  ```
    95  
    96  Stop the last created container (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
    97  ```
    98  $ podman stop --latest
    99  ```
   100  
   101  ## SEE ALSO
   102  **[podman(1)](podman.1.md)**, **[podman-rm(1)](podman-rm.1.md)**
   103  
   104  ## HISTORY
   105  September 2018, Originally compiled by Brent Baude <bbaude@redhat.com>