当前位置:网站首页>Multipass Chinese documentation - Tutorial

Multipass Chinese documentation - Tutorial

2022-06-11 00:15:00 But the teacher

General catalogue ( To be translated and perfected )

1. overview

2. course

3. Directions for use

   3.1 install Multipass

     3.1.1 be based on Linux

     3.1.2 be based on macOS

     3.1.3 be based on Windows

   3.2 Manage instances

     3.2.1 Create examples

     3.2.2 Modify instance

     3.2.3 Using examples

     3.2.4 Use the instance command alias

     3.2.5 Share data with instances

     3.2.6 Remove instance

   3.3 management Multipass

     3.3.1 Set the drive

     3.3.2 Use Multipass Service authorization agent

     3.3.3 Remote use Multipass

     3.3.4 Improve mount performance

     3.3.5 Use Packer pack Multipass Mirror image

     3.3.6 Set image interface

     3.3.7 Use different macOS terminal

   3.4 Troubleshoot problems

     3.4.1 Connection log

     3.4.2 Network troubleshooting


course

Start - A hands-on one for beginners Multipass course

stay Multipass of use Docker Run the container in workflow mode

keyvalue
overview stay Multipass Run in Docker Containers
Category multipass
difficulty 2
author mailto:[email protected]

overview

Multipass The team has recently A new Docker workflow , Allows users to connect to out of the box on any platform (out-of-the-box) Of Docker. This new workflow makes macOS,Windows,Linux Local development and testing on Docker Easy to be simple .

We are going to learn

  • How to be in macOS or Windows On the use of Multipass Use Docker
  • How they relate to docker Command to our main command line
  • How to be in Multipass Use in Portainer Start a container

We need to prepare

  • A computer with internet connection

install Multipass

Duration : 3 minute
We are going to be on our own machine , according to This tutorial , Start installation Multipass. Simply click on the operating system , Just follow the instructions .

Start a Docker virtual machine

Duration :1 minute
Multipass It's already installed , We can easily create a virtual machine to run Docker. Open the terminal , Input

multipass launch docker

This command will create a running the latest version Ubuntu Virtual machine , And has been installed Docker and Portainer. We can now use Docker 了 ! Try this command for yourself

multipass exec docker docker

relation Docker command

Duration :1 minute
Now associated docker Command to our host command line . Now we can run as if on the host Docker equally , Just use docker Command is enough . To associate commands , function

multipass alias docker:docker

This command returns instructions on how to add a new alias to the path . Simply copy and paste the displayed commands . It may grow like this :

PATH="$PATH:/home/<user>/snap/multipass/common/bin"

We can now use... Directly from the command line docker 了 . try , function

docker run hello-world

Use Portainer

Duration : 5 minute
We will go further , use Portainer.Docker The workflow is accompanied by the installed Portainer, It provides an easy to use (easy-to-yse) Graphical interface to manage Docker Containers . In order to connect Portainer, We need it first IP Address . The following command will display the Docker The virtual machine IP Address :

multipass list

It should list 2 individual IP Address , One is Docker Example of , The other is Portainer Of .Portainer Of IP Should be able to 10 Start .

stay Web Enter the first few steps in the browser Portainer IP Address and port , for example :“:9000”. According to the prompt , Set a user name and password , Then select manage local Docker Environmental Science , And click Connect .

Click the newly created "Local"( Local ) Environmental Science , To manage... On the local virtual machine Docker example .

Start the container

Duration : 5 minute
In this tutorial , We will be in Portainer Use in Ghost Template to create a blog . If you're looking for more ideas ,Portainer There are many others app Templates . If you want more options , You can start your Portainer Of Docker hub Or command line launch container .

stay Portainer Inside , Click... On the left toolbar App Templates , Then scroll down to Ghost Templates .

Now? , We can configure and deploy templates . Enter a name , Click the deployment . The bridge The Internet (bridge network) Is the default and correct option .

stay Container page , We can see 2 Containers are running . A container is Ghost, The other container is Portainer It itself .

We can now connect Ghost Blog , The port is Containers Port published on page . for example <VM IP Address>:<Ghost Port>

Only this and nothing more , We are Multipass The blog in the container has run successfully !

Next steps , Have a try Portainer Other App Templates ( step 5), Or you can look at Docker Hub Try more containers . If you want to try container choreography ,Microk8s or Multipass Of Minikube Workflow is a good place to start .

Link to the original text

Multipass Documentation

原网站

版权声明
本文为[But the teacher]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206102255341174.html