docker import : 從歸檔文件中創(chuàng)建鏡像。
docker import [OPTIONS] file|URL|- [REPOSITORY[:TAG]]
OPTIONS說明:
-c :應(yīng)用docker 指令創(chuàng)建鏡像;
-m :提交時(shí)的說明文字;
從鏡像歸檔文件my_ubuntu_v3.tar創(chuàng)建鏡像,命名為nhooo/ubuntu:v4
nhooo@nhooo:~$ docker import my_ubuntu_v3.tar nhooo/ubuntu:v4 sha256:63ce4a6d6bc3fabb95dbd6c561404a309b7bdfc4e21c1d59fe9fe4299cbfea39 nhooo@nhooo:~$ docker images nhooo/ubuntu:v4 REPOSITORY TAG IMAGE ID CREATED SIZE nhooo/ubuntu v4 63ce4a6d6bc3 20 seconds ago 142.1 MB