From a2436a3aa0e01c05980b12baef21c0e685e56738 Mon Sep 17 00:00:00 2001 From: X Date: Thu, 1 Aug 2024 17:10:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Docker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Docker.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Docker.md b/Docker.md index 8231426..5d780bb 100644 --- a/Docker.md +++ b/Docker.md @@ -15,5 +15,22 @@ docker search nginx #删除nginx镜像 docker image rm nignx -# +#将ID为e1ca7233c2fa的镜像保存为本地/tmp目录下uptime-kuma.tar.gz +docker save e1ca7233c2fa -o /tmp/uptime-kuma.tar.gz + +#将文件uptime-kuma.tar.gz,已离线的方式导入为docker镜像并且命名为uptime-kuma:latest + +[root@x tmp]# docker import /tmp/uptime-kuma.tar.gz uptime-kuma:latest +Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg. +Getting image source signatures +Copying blob 2efd0f93ef9a done | +Copying config c48f9721a3 done | +Writing manifest to image destination +sha256:c48f9721a343d5b7e2e5eaf1d36c6f4235548db4207fa0d313161c3de8add5e9 +[root@x tmp]# +[root@x tmp]# docker images +Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg. +REPOSITORY TAG IMAGE ID CREATED SIZE +localhost/uptime-kuma latest c48f9721a343 16 minutes ago 464 MB + ``` \ No newline at end of file