github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/docs/source/markdown/podman-import.1.md (about)

     1  % podman-import(1)
     2  
     3  ## NAME
     4  podman\-import - Import a tarball and save it as a filesystem image
     5  
     6  ## SYNOPSIS
     7  **podman import** [*options*] *path* [*reference*]
     8  
     9  **podman image import** [*options*] *path* [*reference*]
    10  
    11  ## DESCRIPTION
    12  **podman import** imports a tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz)
    13  and saves it as a filesystem image. Remote tarballs can be specified using a URL.
    14  Various image instructions can be configured with the **--change** flag and
    15  a commit message can be set using the **--message** flag.
    16  **reference**, if present, is a tag to assign to the image.
    17  **podman import** is used for importing from the archive generated by **podman export**, that includes the container's filesystem. To import the archive of image layers created by **podman save**, use **podman load**.
    18  Note: `:` is a restricted character and cannot be part of the file name.
    19  
    20  ## OPTIONS
    21  
    22  #### **--arch**
    23  
    24  Set architecture of the imported image.
    25  
    26  #### **--change**=*instruction*, **-c**
    27  
    28  Apply the following possible instructions to the created image:
    29  **CMD** | **ENTRYPOINT** | **ENV** | **EXPOSE** | **LABEL** | **STOPSIGNAL** | **USER** | **VOLUME** | **WORKDIR**
    30  
    31  Can be set multiple times
    32  
    33  #### **--help**, **-h**
    34  
    35  Print usage statement
    36  
    37  #### **--message**, **-m**=*message*
    38  
    39  Set commit message for imported image
    40  
    41  #### **--os**
    42  
    43  Set OS of the imported image.
    44  
    45  #### **--quiet**, **-q**
    46  
    47  Shows progress on the import
    48  
    49  #### **--variant**
    50  
    51  Set variant of the imported image.
    52  
    53  **--verbose**
    54  
    55  Print additional debugging information
    56  
    57  ## EXAMPLES
    58  
    59  ```
    60  $ podman import --change CMD=/bin/bash --change ENTRYPOINT=/bin/sh --change LABEL=blue=image ctr.tar image-imported
    61  Getting image source signatures
    62  Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86
    63   25.80 MB / 25.80 MB [======================================================] 0s
    64  Copying config sha256:c16a6d30f3782288ec4e7521c754acc29d37155629cb39149756f486dae2d4cd
    65   448 B / 448 B [============================================================] 0s
    66  Writing manifest to image destination
    67  Storing signatures
    68  db65d991f3bbf7f31ed1064db9a6ced7652e3f8166c4736aa9133dadd3c7acb3
    69  ```
    70  
    71  ```
    72  $ podman import --change 'ENTRYPOINT ["/bin/sh","-c","test-image"]'  --change LABEL=blue=image test-image.tar image-imported
    73  Getting image source signatures
    74  Copying blob e3b0c44298fc skipped: already exists
    75  Copying config 1105523502 done
    76  Writing manifest to image destination
    77  Storing signatures
    78  110552350206337183ceadc0bdd646dc356e06514c548b69a8917b4182414b
    79  ```
    80  ```
    81  $ podman import --change "CMD /bin/sh"  --change LABEL=blue=image test-image.tar image-imported
    82  Getting image source signatures
    83  Copying blob e3b0c44298fc skipped: already exists
    84  Copying config ae9a27e249 done
    85  Writing manifest to image destination
    86  Storing signatures
    87  ae9a27e249f801aff11a4ba54a81751ea9fbc9db45a6df3f1bfd63fc2437bb9c
    88  ```
    89  
    90  
    91  ```
    92  $ cat ctr.tar | podman -q import --message "importing the ctr.tar tarball" - image-imported
    93  db65d991f3bbf7f31ed1064db9a6ced7652e3f8166c4736aa9133dadd3c7acb3
    94  ```
    95  
    96  ```
    97  $ cat ctr.tar | podman import -
    98  Getting image source signatures
    99  Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86
   100   25.80 MB / 25.80 MB [======================================================] 0s
   101  Copying config sha256:d61387b4d5edf65edee5353e2340783703074ffeaaac529cde97a8357eea7645
   102   378 B / 378 B [============================================================] 0s
   103  Writing manifest to image destination
   104  Storing signatures
   105  db65d991f3bbf7f31ed1064db9a6ced7652e3f8166c4736aa9133dadd3c7acb3
   106  ```
   107  
   108  ```
   109  $ podman import http://example.com/ctr.tar url-image
   110  Downloading from "http://example.com/ctr.tar"
   111  Getting image source signatures
   112  Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86
   113   25.80 MB / 25.80 MB [======================================================] 0s
   114  Copying config sha256:5813fe8a3b18696089fd09957a12e88bda43dc1745b5240879ffffe93240d29a
   115   419 B / 419 B [============================================================] 0s
   116  Writing manifest to image destination
   117  Storing signatures
   118  db65d991f3bbf7f31ed1064db9a6ced7652e3f8166c4736aa9133dadd3c7acb3
   119  ```
   120  
   121  ## SEE ALSO
   122  **[podman(1)](podman.1.md)**, **[podman-export(1)](podman-export.1.md)**
   123  
   124  ## HISTORY
   125  November 2017, Originally compiled by Urvashi Mohnani <umohnani@redhat.com>