- Please download the ubuntuPouch.vdi. It is recommended to download this file in advance because it is relatively large (3.2G).
-
The links are as follows:
- Link of Mac version password:p5Sb
- Link of Windows version password:V7ms
Next we will take the intallation process of windows version as an example. After downloading, please click the msi file to install. The key installation steps are as follows:
Then click next button according to the default settings. Then the following error occurs: can not find the source file named common.cab.
Open the directory where the MSI is located and you will find that the file common.cab does not exist, which leads to the failing installation. The solutions are as follows:
-
Please open link and download the installer:
-
Please open cmd and switch to the path of the above installer. Then run the command:
VirtualBox-4.3.12-93733-Win.exe -extract
- The system prompts it has been extracted to the following directory:
c:\users\15627\AppData\Local\Temp\VirtualBox
- Please enter the directory and you can find three files, i.e. common.cab, VirtualBox-5.2.8-r121009-MultiArch_amd64.msi (for 64-bit system), VirtualBox-5.2.8-r121009-MultiArch_x86.msi (for 32-bit system).
- Please click and run VirtualBox-5.2.8-r121009-MultiArch_amd64.msi. Continue to click the next button according to the default settings. After installing successfully, the following icon will be found on the desktop.
-
Please click the desktop icon to open VirtualBox.
-
Click new - Customize name- Select type of Linux - Select version of Ubuntu (64-bit) - Continue - Select memory of 1024M - Continue - Select Existing Virtual Hard Disk File - Select the vdi file - Click create. The whole process is shown below:
-
Please start the new instance and set username as
pouch
, whose password is123456
. Run the following command to switch to the root.
sudo -i
- Run the command to check whether the network is normal.
ping www.alibaba-inc.com
It is normal if the outputs are as followings:
- Run the command to start the service of pouch.
systemctl start pouch
- Run the comamnd to start a busybox container.
pouch run -t -d busybox sh
- Run the comamnd to login in the container.
pouch exec -it {ID} sh
The ID is the first six digits of the complete ID of the previous command output, as shown below:
Then you will enter the shell of the container. You can run some basic commands, such as uname -a
to prove that you are in the container.
- From link https://github.com/alibaba/pouch/master to fork the codes to your own github account and clone your master branch to the local.
- Please open the virtualBox and enter the command to view the environment variables of go.
go env
You will find GOPATH as follows:
GOPATH="/root/gopath"
If you want to use the host machine for development and run the test in the virtual machine, you should mount the above-mentioned pulled repo to the following path in the virtual machine:
/root/gopath/src/github.com/alibaba/pouch
- Add the local pouch folder to the shared folder of the virtual machine, as shown below:
- Please create the directory in the virtual machine:
mkdir /root/gopath/src/github.com/alibaba/pouch
You should ensure that there are no files in the pouch folder, as shown below:
- To mount the shared folder, the enhanced functionality is required, as shown below:
-
Please switch to the directory:
/root/gopath/src/github.com/alibaba
, and run the following commands in order.mount /dev/cdrom /media/cdrom /media/cdrom/VBoxLinuxAdditions.run mount -t vboxsf pouch /root/gopath/src/github.com/alibaba/pouch cd pouch ls -l
If the outputs are as followings, the mount is successful. Then you can develop happily on the host machine!