Files
nexus/Technical/Home Office/🟠如何传输Docker images 并且在另一个Docker安装.md

31 lines
869 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: How to transfer Docker images and install in another Docker
author: shenwei
created: 2025-03-06
tags: [docker, nas, synology]
---
#docker #synology #nas
Here is a example about transfer Docker images from my work laptop to my Synology NAS Docker
我在我自己工作的笔记本上安装了DockerDesktop版本然后正常的pull xiaoya 的image:
```docker
docker pull xiaoyaliu/alist
```
通过以下命令将下载的image打包成tar文件
```docker
docker save -o xiaoya.tar xiaoyaliu/alist
```
我将打包好的xiaoya.tar文件上传到NAS文件系统里去然后还是通过Putty来运行docker命令将image导入NAS的Docker中去。
```docker
#cd 到xiaoya.tar存放的路径之后运行以下命令
docker load < xiaoya.tar
```
然后再进入NAS的Container Manager 界面后在image里就可以看到扫xiaoya/alist这个image了