区别介绍
和其它虚拟化软件的区别
和 docker 的区别
下载地址
https://github.com/apple/container
下载完成后,进行一步一步的安装即可,都是可视化安装。
常用命令
启动主服务
container system start | 启动 Apple Container 的后台服务,这是运行所有容器和 machine 的前提。第一次启动需要下载相关程序。 |
镜像管理
| container image list | 查看当前的镜像文件 |
| container image pull docker.io/nginx:latest | 拉取nginx镜像 |
容器管理
| container list | 查看当前运行的容器 |
| container list --all | 查看当前所有的容器,包括已停止的容器 |
| container run -d --name nginx nginx:latest | 启动一个nginx容器 |
| container start/stop/status nginx | 启动停止查看容器状态 |
| container rm nginx | 删除容器 |
创建系统
安装系统
| 从 docker hub 拉取 | |
| container machine create centos:centos7.9.2009 --name centos7 | 创建一个 centos 系统 |
管理系统
| container machine list(container m ls) | 查看创建好的 Linux 环境 |
| container machine run -n centos7 container machine run -n centos7 -u root | 进入系统 |
| container machine stop centos7 | 停止系统 |
| container machine rm centos7 | 删除系统 |
| container machine inspect centos7 | 查看系统的详细信息 |
| container machine set-default centos7 | 设置为默认系统 |
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END