在新主机上首次安装PouchContainer之前,您需要建立PouchContainer仓库。我们默认启用了stabel 仓库,因为您始终需要stabel 仓库。要添加 test 仓库,请在以下命令行中的单词 stable 之后添加单词 test 。在此之后,您可以从仓库安装和更新PouchContainer。
mkdir -p $GOPATH/src/github.com/alibaba/
cd $GOPATH/src/github.com/alibaba/; git clone https://github.com/alibaba/pouch.git
cd pouch; git checkout master
名为 build 的Makefile target将编译当前工作目录中的pouch和pouchd二进制文件。或者您可以执行 make install 来构建二进制文件并将它们安装在目标目录中(默认情况下为 /usr/local/bin )。
make install
启动PouchContainer
安装了所有需要的二进制文件后,您可以通过以下方式启动pouchd:
$ pouchd
INFO[0000] starting containerd module=containerd revision=773c489c9c1b21a6d78b5c538cd395416ec50f88 version=v1.0.3
INFO[0000] setting subreaper... module=containerd
INFO[0000] loading plugin "io.containerd.content.v1.content"... module=containerd type=io.containerd.content.v1
INFO[0000] loading plugin "io.containerd.snapshotter.v1.btrfs"... module=containerd type=io.containerd.snapshotter.v1
WARN[0000] failed to load plugin io.containerd.snapshotter.v1.btrfs error="path /var/lib/containerd/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" module=containerd
INFO[0000] loading plugin "io.containerd.snapshotter.v1.overlayfs"... module=containerd type=io.containerd.snapshotter.v1
INFO[0000] loading plugin "io.containerd.metadata.v1.bolt"... module=containerd type=io.containerd.metadata.v1
WARN[0000] could not use snapshotter btrfs in metadata plugin error="path /var/lib/containerd/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" module="containerd/io.containerd.metadata.v1.bolt"
INFO[0000] loading plugin "io.containerd.differ.v1.walking"... module=containerd type=io.containerd.differ.v1
INFO[0000] loading plugin "io.containerd.grpc.v1.containers"... module=containerd type=io.containerd.grpc.v1
在pouchd运行之后,您可以通过PouchContainer CLI与pouchd进行交互:
$ pouch images
IMAGE ID IMAGE NAME SIZE
3e8fa85ddfef docker.io/library/busybox:latest 2699
504cf109b492 docker.io/library/redis:alpine 2035