Docker import Command
docker import : Create an image from a tarball.
Syntax
docker import [OPTIONS] file|URL|- [REPOSITORY[:TAG]]
OPTIONS Description:
-
-c : Apply Docker instructions while creating the image;
-
-m : Commit message;
Example
Create an image from the tarball my_ubuntu_v3.tar and name it tutorialpro/ubuntu:v4
tutorialpro@tutorialpro:~$ docker import my_ubuntu_v3.tar tutorialpro/ubuntu:v4
sha256:63ce4a6d6bc3fabb95dbd6c561404a309b7bdfc4e21c1d59fe9fe4299cbfea39
tutorialpro@tutorialpro:~$ docker images tutorialpro/ubuntu:v4
REPOSITORY TAG IMAGE ID CREATED SIZE
tutorialpro/ubuntu v4 63ce4a6d6bc3 20 seconds ago 142.1 MB