This only works if you are using a macos machine. If you are not using a macos machine, then you should use docker, or one of the other setup options.
If you have any issues please let us know on ed! This is a new guide and we want to improve it however we can!
Install Orbstack
The first step is to install Orbstack. You can do it through two ways:
- Download Orbstack Note: You need to figure out if you are apple silicon or intel. To do this select the apple icon in the top left corner of your menu bar. There should be an option called “About This Mac”. Select that option. A pop up should show up and it should tell you what “chip” you have. If it is an “Apple M1”, “Apple M2”, etc. then you should have apple silicon. If it says Intel in the name somewhere (or if it just doesn’t have the word “apple” in it) then you have an intel machine.
- install it through Homebrew with
brew install orbstack
Download the Docker Container
You only need to set this up once. Also yes, this is a docker container. Orbstack is just a front end that runs on top of docker engine. Orbstack is just preferred as a frontend compared to Docker Desktop.
Open a new terminal window. By default it should start under your current user’s directory. You can use the pwd command to print your terminal’s current path:
pwd
To see all of the files and directories within the current working directory, you can use the ls command:
ls
If you don’t want to store your project files under the current working directory, you can use the cd command to “change directory” in your terminal. For example, you can navigate to the Documents directory (if it already exists, relative to your current working directory) with the following command:
cd Documents
If you need to make a new directory, you can do so using the mkdir command. For example, you can make a directory named moya_container in the current working directory as follows:
mkdir moya_container
Then you can change to the newly created directory using cd:
cd moya_container
Using pwd, note where your created directory is, which may come in handy in the future.
Now execute the following command, given that the current working directory is the one created above:
docker run -td --user moya -v "${PWD}:/home/moya/shared" -p 4096:4096 --name moya-container tqmcgaha/docker-env:moya
This command line will pull (download) tqmcgaha/docker-env:moya Docker Image onto your computer, and then create a new Docker Container named moya-container using that Image. The path /home/moya/shared inside the container is mapped to the current working directory of your host system (${PWD}).
If you want to know more about the meaning of these command line arguments, please refer to docker run or Docker Documentation.
Now you should have the container moya-container created and running. You should be able to see this container in Docker Desktop’s Containers tab, or using docker ps command.
Use the Docker Container:
After you finished the above steps, you can now execute this command to spawn and attach to a shell inside the docker container:
docker exec -it moya-container bash
********IMPORTANT IMPORTANT IMPORTANT**************** If the container ever asks you for a password (e.g. to install something) try typing in
systemsRcool. It may not show the password as you type it, that is normal. ********IMPORTANT IMPORTANT IMPORTANT****************
If you want to know more about the meaning of these command line arguments, please refer to docker exec or Docker Documentation.
If you see the following error, maybe after a computer reboot:
Error response from daemon: Container [...] is not running
Then click the start button for the container in Orbstack to make sure the container is running, or use docker start moya-container to start the container.
When you execute any commands related to this class from now on, make sure to execute them inside the Docker Container. One way to distinguish between if you are inside the Docker is to pay attention to the prompt text: if you are in the Docker Container, the prompt should be something similar to
moya@4d98e91a6924:~/shared$
Another way, for example, is to execute docker command. If you are outside Docker (on your host OS), docker command should output a list of help texts; If you are inside Docker, executing docker command should give you docker: command not found error.