
Ubuntu Server と LXC を apt 用にインストールした新しいサーバーを立ち上げました。ドキュメントを読んで、イメージ/テンプレートをインポートする方法を理解しようとしています。パブリック イメージのリストをインポートする方法、特に Alpine で新しいインスタンスを設定する方法を理解するのに苦労しています。これは ISO の tarball (man ページから) で実行できると思いますが、リモート オプションもあります。
LXC コンテナのリストはこちら:出典: http://www.linux.org/これらは lxc-download テンプレート経由で利用できると書かれていますが、これはテンプレートをトリガーするコマンドだと思っていましたが、今はさらに混乱しています。
答え1
LXC を使用する場合、通常は次のようなコマンドで新しいコンテナを設定します。
lxc-create -n ${c} -t download -- -d ${d} -r ${r} -a amd64
ここでc
、 は選択したコンテナ名、d
は「alpine」などのディストリビューション、r
はリリースのバージョン番号です。次に例を示します。
# lxc-create -n test -t download -- -d alpine -r 3.12 -a amd64
The cached copy has expired, re-downloading...
Setting up the GPG keyring
Downloading the image index
Downloading the rootfs
Downloading the metadata
The image cache is now ready
Unpacking the rootfs
---
You just created an Alpinelinux 3.12 x86_64 (20201213_13:00) container.