当前位置:网站首页>Multipass中文文档-教程
Multipass中文文档-教程
2022-06-10 22:56:00 【但老师】
总目录(待翻译完完善)
1. 概览
2. 教程
3. 使用指引
3.1 安装Multipass
3.1.1 基于Linux
3.1.2 基于macOS
3.1.3 基于Windows
3.2 管理实例
3.2.1 创建实例
3.2.2 修改实例
3.2.3 使用实例
3.2.4 使用实例命令别名
3.2.5 与实例共享数据
3.2.6 移除实例
3.3 管理Multipass
3.3.1 设置驱动
3.3.2 使用Multipass服务授权代理
3.3.3 远程使用Multipass
3.3.4 提高挂载性能
3.3.5 使用Packer打包Multipass镜像
3.3.6 设置图像界面
3.3.7 使用不同的macOS终端
3.4 问题排查
3.4.1 连接日志
3.4.2 网络问题排查
教程
开始 - 为新手准备的一个需要动手的Multipass教程
在Multipass中用Docker工作流方式运行容器
| key | value |
|---|---|
| 概览 | 在Multipass中运行Docker容器 |
| 类别 | multipass |
| 难度 | 2 |
| 作者 | mailto:[email protected] |
概览
Multipass团队最近发布了一个新的Docker工作流,可以让用户在任何平台连接到开箱即用(out-of-the-box)的Docker。这种新的工作流让macOS,Windows,Linux上的本地开发和测试Docker容易变得简单。
我们即将学习
- 如何在macOS或Windows上用Multipass使用Docker
- 如何关联
docker命令到我们的主命令行 - 如何在Multipass中使用Portainer启动一个容器
我们需要准备
- 一台带联网的电脑
安装Multipass
时长: 3 分钟
我们即将在自己机器是上,根据这个教程,开始安装Multipass。只需要简单的在操作系统上点击,跟从指引即可。
启动一个Docker虚拟机
时长:1 分钟
Multipass已经安装好了,我们可以非常简单的创建一个虚拟机来跑Docker。打开终端,输入
multipass launch docker
这个命令会创建一个运行最新版本Ubuntu的虚拟机,并且已安装好Docker和Portainer。我们现在已经可以使用Docker了!自己试试下面这个命令
multipass exec docker docker
关联Docker命令
时长:1 分钟
现在关联docker命令到我们的主机命令行。现在我们可以像在主机上运行Docker一样,只要使用docker命令即可。为了关联命令,运行
multipass alias docker:docker
这个命令会返回如何添加新别名到路径的指引。简单地复制粘贴显示的命令就可以了。它可能会长这个样子:
PATH="$PATH:/home/<user>/snap/multipass/common/bin"
我们现在可以直接从命令行使用docker了。试试,运行
docker run hello-world
使用Portainer
时长: 5 分钟
我们将更进一步,用Portainer。Docker工作流伴随着已安装的Portainer,它提供了一个简单易用的(easy-to-yse)图形界面去管理Docker容器。为了连接Portainer,我们首先需要它的IP地址。下面的命令会显示我们在之前步骤中创建的Docker虚拟机的IP地址:
multipass list
应该会列出2个IP地址,一个是Docker实例的,另一个是Portainer的。Portainer的IP应该会以10开始。
在Web浏览器中输入前几步Portainer IP地址和端口,例如:“:9000”。根据提示,设置一个用户名和密码,然后选择管理本地Docker环境,并点击连接。
点击最新创建的"Local"(本地)环境,以在本地虚拟机上管理Docker实例。
启动容器
时长: 5 分钟
在这个教程里,我们会在Portainer中使用Ghost模板创建一个博客。如果你在寻求更多想法,Portainer有很多其他app模板。如果你想要更多选择,你可以从Portainer的Docker hub或命令行启动容器。
在Portainer内部,点击左边工具栏的App模板,然后往下滚动到Ghost模板。
现在,我们可以配置并部署模板。输入一个姓名,点击部署。桥接网络(bridge network)是默认且正确的选项。
在Container页,我们可以看到2个容器在运行中。一个容器是Ghost,另一个容器是Portainer它自己。
我们现在可以连接Ghost博客里,端口是Containers页公布的端口。例如<VM IP Address>:<Ghost Port>
到此为止,我们在Multipass里面的容器中的博客已经运行成功!
下面几步,试一下Portainer其他的App模板(步骤5),或者看看Docker Hub去试试更多容器。如果你想试试容器编排,Microk8s或Multipass的Minikube工作流是一个很好的起始地。
原文链接
边栏推荐
- 对接请求方式
- Compared with the "South-to-North Water Transfer", what will the "east to west" of the fire bring to cloud computing?
- [turtle confessions collection] "the moon at the bottom of the sea is the moon in the sky, and the person in front of us is the sweetheart." Be happy for the rest of your life, and be safe for ever ~
- From the perspective of Confucius Temple IP crossover, we can see how the six walnuts become "butterflies" for the second time
- VTK example -- three intersecting planes
- Excel单元格
- 【Pygame小游戏】剧情流推荐:什么样的游戏才能获得大家的喜欢呢?(魔鬼恋人、霸总娇妻版)
- Website online customer service system Gofly source code development log - 5 Gin framework integration daemon
- 【JVM】垃圾回收机制
- 【JVM】内存模型
猜你喜欢

【JVM】类加载机制

【Pygame合集】滴~穿越童年游戏指南 请查收:这里面有你玩过的游戏嘛?(附五款源码自取)

【颜值检测神器】来,请拿出你们的绝活(这颜值,对得起观众么?)
![[JVM] class loading mechanism](/img/62/24b6fbec273b5cbf2338b6f4b6fe6a.png)
[JVM] class loading mechanism

SystemVerilog (x) - user defined type

Hyperleger fabric installation
![[pyGame games] in the first month, it broke 100 million to download a masterpiece that is highly integrated with](/img/f5/d947f5e5c2abf79c0fac2f45103ec0.png)
[pyGame games] in the first month, it broke 100 million to download a masterpiece that is highly integrated with "super casual game features"~

VTK example -- three intersecting planes

Unity自定义文件夹图标颜色 个性化Unity编译器

In the month of safety production, Huangpu launched a publicity campaign for gas safety in shops
随机推荐
Typecho blog site wide deployment of Tencent cloud CDN tutorial - Xingze V Club
Openresty installation
[daily] robots Txt allow all search engines to include
[pyGame collection] memory killing - "Childhood Games", how many shots did you get? (attach five source codes for self access)
SQL查询,子查询作为结果字段
【Pygame小游戏】这款“打地鼠”小游戏要火了(来来来)
VTK例子--三个相交的平面
第一章 总论-会计基础
对接请求方式
Njupt Nanyou Discrete Mathematics_ Experiment 2
Leetcode-560 and subarray with K
Leetcode-15 sum of three numbers
Method of converting file to multipartfile
Hyperleger fabric installation
Exemple VTK - - trois plans qui se croisent
In the month of safety production, Huangpu launched a publicity campaign for gas safety in shops
【JVM】内存模型
基于华为云ECS的目标检测与识别的昇腾AI开发体验【华为云至简致远】
Basic introduction and core components of kubernetes
yum源更新