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

     1  % podman-history 1
     2  
     3  ## NAME
     4  podman\-history - Show the history of an image
     5  
     6  ## SYNOPSIS
     7  **podman history** [*options*] *image*[:*tag*|@*digest*]
     8  
     9  **podman image history** [*options*] *image*[:*tag*|@*digest*]
    10  
    11  ## DESCRIPTION
    12  **podman history** displays the history of an image by printing out information
    13  about each layer used in the image. The information printed out for each layer
    14  include Created (time and date), Created By, Size, and Comment. The output can
    15  be truncated or not using the **--no-trunc** flag. If the **--human** flag is
    16  set, the time of creation and size are printed out in a human readable format.
    17  The **--quiet** flag displays the ID of the image only when set and the **--format**
    18  flag is used to print the information using the Go template provided by the user.
    19  
    20  ## OPTIONS
    21  
    22  #### **--format**=*format*
    23  
    24  Alter the output for a format like 'json' or a Go template.
    25  
    26  Valid placeholders for the Go template are listed below:
    27  
    28  | **Placeholder**        | **Description**                                                           |
    29  |------------------------|---------------------------------------------------------------------------|
    30  | .Comment               | Comment for the layer                                                     |
    31  | .Created               | if --human, time elapsed since creation, otherwise time stamp of creation |
    32  | .CreatedAt             | Time when the image layer was created                                     |
    33  | .CreatedBy             | Command used to create the layer                                          |
    34  | .CreatedSince          | Elapsed time since the image layer was created                            |
    35  | .ID                    | Image ID                                                                  |
    36  | .Size                  | Size of layer on disk                                                     |
    37  | .Tags                  | Image tags                                                                |
    38  
    39  #### **--help**, **-h**
    40  
    41  Print usage statement
    42  
    43  #### **--human**, **-H**
    44  
    45  Display sizes and dates in human readable format (default *true*).
    46  
    47  #### **--no-trunc**
    48  
    49  Do not truncate the output (default *false*).
    50  
    51  #### **--quiet**, **-q**
    52  
    53  Print the numeric IDs only (default *false*).
    54  
    55  ## EXAMPLES
    56  
    57  Show the history of the specified image:
    58  ```
    59  $ podman history debian
    60  ID              CREATED       CREATED BY                                      SIZE       COMMENT
    61  b676ca55e4f2c   9 weeks ago   /bin/sh -c #(nop) CMD ["bash"]                  0 B
    62  <missing>       9 weeks ago   /bin/sh -c #(nop) ADD file:ebba725fb97cea4...   45.14 MB
    63  ```
    64  
    65  Show the history of the specified image without truncating content and using raw data:
    66  ```
    67  $ podman history --no-trunc=true --human=false debian
    68  ID              CREATED                CREATED BY                                      SIZE       COMMENT
    69  b676ca55e4f2c   2017-07-24T16:52:55Z   /bin/sh -c #(nop) CMD ["bash"]                  0
    70  <missing>       2017-07-24T16:52:54Z   /bin/sh -c #(nop) ADD file:ebba725fb97cea4...   45142935
    71  ```
    72  
    73  Show the formatted history of the specified image:
    74  ```
    75  $ podman history --format "{{.ID}} {{.Created}}" debian
    76  b676ca55e4f2c   9 weeks ago
    77  <missing>       9 weeks ago
    78  ```
    79  
    80  Show the history in JSON format for the specified image:
    81  ```
    82  $ podman history --format json debian
    83  [
    84      {
    85  	"id": "b676ca55e4f2c0ce53d0636438c5372d3efeb5ae99b676fa5a5d1581bad46060",
    86  	"created": "2017-07-24T16:52:55.195062314Z",
    87  	"createdBy": "/bin/sh -c #(nop)  CMD [\"bash\"]",
    88  	"size": 0,
    89  	"comment": ""
    90      },
    91      {
    92  	"id": "b676ca55e4f2c0ce53d0636438c5372d3efeb5ae99b676fa5a5d1581bad46060",
    93  	"created": "2017-07-24T16:52:54.898893387Z",
    94  	"createdBy": "/bin/sh -c #(nop) ADD file:ebba725fb97cea45d0b1b35ccc8144e766fcfc9a78530465c23b0c4674b14042 in / ",
    95  	"size": 45142935,
    96  	"comment": ""
    97      }
    98  ]
    99  ```
   100  
   101  ## SEE ALSO
   102  **[podman(1)](podman.1.md)**
   103  
   104  ## HISTORY
   105  July 2017, Originally compiled by Urvashi Mohnani <umohnani@redhat.com>