使用LXC/LXD时想像docker一样先把镜像缓存到本地,但是不知道如何操作,探究许久发现真相。
afu@instance-lxc:~$ lxc image copy ubuntu:18.04 local:
Image copied successfully!
afu@instance-lxc:~$ lxc image list
+-------+--------------+--------+-----------------------------------------------+--------+----------+-----------------------------+
| ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCH | SIZE | UPLOAD DATE |
+-------+--------------+--------+-----------------------------------------------+--------+----------+-----------------------------+
| | 9e7158fc0683 | no | ubuntu 18.04 LTS amd64 (release) (20200129.1) | x86_64 | 178.73MB | Feb 5, 2020 at 5:07am (UTC) |
+-------+--------------+--------+-----------------------------------------------+--------+----------+-----------------------------+
afu@instance-lxc:~$ lxc image copy ubuntu:16.04 local:
Image copied successfully!
afu@instance-lxc:~$ lxc image list
+-------+--------------+--------+-----------------------------------------------+--------+----------+-----------------------------+
| ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCH | SIZE | UPLOAD DATE |
+-------+--------------+--------+-----------------------------------------------+--------+----------+-----------------------------+
| | 62c59cf09683 | no | ubuntu 16.04 LTS amd64 (release) (20200129) | x86_64 | 159.20MB | Feb 5, 2020 at 9:03am (UTC) |
+-------+--------------+--------+-----------------------------------------------+--------+----------+-----------------------------+
| | 9e7158fc0683 | no | ubuntu 18.04 LTS amd64 (release) (20200129.1) | x86_64 | 178.73MB | Feb 5, 2020 at 5:07am (UTC) |
+-------+--------------+--------+-----------------------------------------------+--------+----------+-----------------------------+
凡事多动手,多动手。