Installation¶
In order to run mTree we need to install Docker Desktop first.
Installing Docker Desktop¶
The links for Docker Desktop installation for different os can be found below.
Tip
If you have a Windows machine and end up at the following prompt after installing Docker Desktop -
WLS 2 Installation Incomplete
Visit the link and only complete Step 4 from the webpage
After completing the Docker Desktop installation, we can start installing mTree
Installing mTree¶
You can install mTree by pasting the following code in your Command Prompt, PowerShell or Terminal. However, make sure to check for the latest version of mTree here, in case the one below is out of date.
docker pull mtree/mtree:1.0.11c
After pasting and running the command in your Command Prompt, your screen should look like something like this
Your Command Prompt/Terminal/PowerShell after docker pull command
Note
If you get an ERROR message in your Command Prompt try running the command after starting the Docker Desktop App and see if that helps.
Note
It is important that your Command Prompt is based in the same virtual environment where you have Docker Desktop installed in order for the docker pull command to work. If you don’t understand what this means, you don’t have to worry about this.
mTree Container Setup¶
Tip
If you don’t have an mTree simulation that is ready to run or you are new to mTree, visit the Quickstart Guide before you do this next step.
Open Docker Desktop app on your computer and click Images on the sidebar.
Images Section on the Docker Desktop App
You should see the mTree image we just downloaded through docker hub in the previous step. In the next step, we are going to run this image within a small virtualization of the os called a container. We can create our docker container by clicking RUN on the mTree image.
After that you should see the following window. Follow all the steps, in the image below, before moving on to the next step.
mTree container setup
Once all the instructions in the above image are completed, you should click Containers/Apps on the sidebar. After hitting Containers/Apps, you should see the following container -
Container/Apps Section on the Docker Desktop App
Container Options¶
Your container comes with several options that can be executed to change its state.
Start¶
Click START to start your container.
START button
A running docker container should have a green symbol on the left side.
A running docker container
Open Shell¶
Once your container is running, you should click CLI button to open the Command Prompt/ shell
linked to your container.
CLI button
The shell produced by Docker should look similar to the following -
docker shell