如何在没有互联网连接的情况下使用 snap 安装 docker。
我已经使用以下方式安装了 Ubuntu多程. 我的操作系统详细信息:
root@docker:/home/ubuntu/microk8s# hostnamectl
Static hostname: docker
Icon name: computer-vm
Chassis: vm
Machine ID: 623942f2a0ca411a85486e31ec4949e7
Boot ID: 429b1a83e1b8418496bcfde7e435ab61
Virtualization: bhyve
Operating System: Ubuntu 18.04.3 LTS
Kernel: Linux 4.15.0-76-generic
Architecture: x86-64
我已将 docker snap 离线。
root@docker:~/home/rabraham/tmp/snap# ls
docker_423.assert docker_423.snap
在尝试离线安装时,我得到了
root@docker:~/home/rabraham/tmp/snap# snap ack docker_423.assert
root@docker:~/home/rabraham/tmp/snap# snap install docker_423.snap
error: cannot perform the following tasks:
- Ensure prerequisites for "docker" are available (Post https://api.snapcraft.io/v2/snaps/refresh: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers))
这回答建议也下载ubuntu-core
root@docker:~/home/rabraham/tmp/snap# ls
docker_423.assert docker_423.snap ubuntu-core_1797.assert ubuntu-core_1797.snap
安装后,我收到另一个错误。
root@docker:~/home/rabraham/tmp/snap# snap ack ubuntu-core_1797.assert
root@docker:~/home/rabraham/tmp/snap# snap install ubuntu-core_1797.snap
2020-02-11T19:11:27-05:00 INFO Waiting for restart...
ubuntu-core 16-2 from Canonical✓ installed
root@docker:~/home/rabraham/tmp/snap# snap ack docker_423.assert
root@docker:~/home/rabraham/tmp/snap# snap install docker_423.snap
error: cannot perform the following tasks:
- Ensure prerequisites for "docker" are available (cannot get nonce from store: Post https://api.snapcraft.io/api/v1/snaps/auth/nonces: dial tcp: lookup api.snapcraft.io: No address associated with hostname)