github.com/baris/docker@v1.7.0/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 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 from a local file and tag 39 40 Import to docker via pipe and stdin: 41 42 # cat exampleimageV2.tgz | docker import - example/imagelocal:V-2.0 43 44 ## Import from a local directory 45 46 # tar -c . | docker import - exampleimagedir 47 48 ## Apply specified Dockerfile instructions while importing the image 49 This example sets the docker image ENV variable DEBUG to true by default. 50 51 # tar -c . | docker import -c="ENV DEBUG true" - exampleimagedir 52 53 # See also 54 **docker-export(1)** to export the contents of a filesystem as a tar archive to STDOUT. 55 56 # HISTORY 57 April 2014, Originally compiled by William Henry (whenry at redhat dot com) 58 based on docker.com source material and internal work. 59 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>