github.com/gunjan5/docker@v1.8.2/man/docker-import.1.md (about)

     1  % DOCKER(1) Docker User Manuals
     2  % Docker Community
     3  % JUNE 2014
     4  # NAME
     5  docker-import - Create an empty filesystem image and import the contents of the tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) into it, then optionally tag it.
     6  
     7  # SYNOPSIS
     8  **docker import**
     9  [**-c**|**--change**[= []**]]
    10  [**--help**]
    11  file|URL|- [REPOSITORY[:TAG]]
    12  
    13  # OPTIONS
    14  **-c**, **--change**=[]
    15     Apply specified Dockerfile instructions while importing the image
    16     Supported Dockerfile instructions: `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR`
    17  
    18  # DESCRIPTION
    19  Create a new filesystem image from the contents of a tarball (`.tar`,
    20  `.tar.gz`, `.tgz`, `.bzip`, `.tar.xz`, `.txz`) into it, then optionally tag it.
    21  
    22  # OPTIONS
    23  **--help**
    24    Print usage statement
    25  
    26  # EXAMPLES
    27  
    28  ## Import from a remote location
    29  
    30      # docker import http://example.com/exampleimage.tgz example/imagerepo
    31  
    32  ## Import from a local file
    33  
    34  Import to docker via pipe and stdin:
    35  
    36      # cat exampleimage.tgz | docker import - example/imagelocal
    37  
    38  Import to a Docker image from a local file.
    39  
    40      # docker import /path/to/exampleimage.tgz 
    41  
    42  
    43  ## Import from a local file and tag
    44  
    45  Import to docker via pipe and stdin:
    46  
    47      # cat exampleimageV2.tgz | docker import - example/imagelocal:V-2.0
    48  
    49  ## Import from a local directory
    50  
    51      # tar -c . | docker import - exampleimagedir
    52  
    53  ## Apply specified Dockerfile instructions while importing the image
    54  This example sets the docker image ENV variable DEBUG to true by default.
    55  
    56      # tar -c . | docker import -c="ENV DEBUG true" - exampleimagedir
    57  
    58  # See also
    59  **docker-export(1)** to export the contents of a filesystem as a tar archive to STDOUT.
    60  
    61  # HISTORY
    62  April 2014, Originally compiled by William Henry (whenry at redhat dot com)
    63  based on docker.com source material and internal work.
    64  June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>