鏡像簡(jiǎn)介
- 鏡像是一個(gè)Docker的可執(zhí)行文件,其中包括運(yùn)行應(yīng)用程序所需的所有代碼內(nèi)容、依賴庫树绩、環(huán)境變量和配置文件等。
- 通過鏡像可以創(chuàng)建一個(gè)或多個(gè)容器隐轩。
鏡像管理
-
鏡像搜索:docker search
- docker search ubuntu
- docker search -f is-official=true ubuntu
-
鏡像查看:docker images / docker image ls
- docker images
- docker images centos:latest
-
鏡像下載:docker pull
- docker pull ubuntu 默認(rèn)下載latest
- docker pull ubuntu:16.04
-
刪除鏡像:docker rmi / docker image rm
- docker rmi e934 a298
-
鏡像保存?zhèn)浞荩篸ocker save
- docker save -o mytest.tar centos ubuntu
-
鏡像備份導(dǎo)入:docker load
- docker load -i mytest.tar
-
鏡像重命名:docker tag
- docker tag e934 centos-new:newtag
-
docker 詳細(xì)信息:docker image inspect / docker inspect
- docker image inspect centos
- docker image inspect -f "{{json .Id}}" centos
-
鏡像歷史信息:docker history
- docker history ubuntu
- docker history ubuntu -H=false