This is a step-by-step guide to create a container on Docker.app for Apple Silicon (and other) Macs to run the course materials for Linguistics 380.
UPDATE: ONLY KEY PACKAGES ARE INSTALLED ON THIS IMAGE
We will install packages on as-needed basis.
We are going to start from scratch, well not quite, but mostly. Here are a few things you need to do to prepare your system setup for the next steps.
- Find the folder on your computer that you have your existing Docker container connected to. Copy/ paste that folder to your Desktop to back it up so we make sure we don't lose anything you've created in the class so far.
- Go to Docker.app and navigate to the Containers tab. Make sure to stop the container you are currently using for RStudio and then delete it by clicking the trash can icon.
You can now move to step 1 of this new setup.
Navigate to the Images tab in Docker.app. We are going to use the francojc/rstudio-m-macs
image to create a new container. You wil need to pull it by using the search bar at the top of the Images tab and type francojc/rstudio-m-macs
. Click on the image and then click the Pull
button.
In this step, we are going to create a new container using the francojc/rstudio-m-macs
image. The container configurations are very similar to the previous container you created, but make sure to not skip any steps in the configuration.
- Run the
francojc/rstudio-m-macs
image by clicking theRun
button. - Expand the configuration and fill out the following fields:
- Name:
linguistics-rstudio
- Port:
8787
- Volume: Click the
...
button and add the path to the folder that you used for the previous RStudio container1. This will allow you to access the files you have already created. Then, make sure to map the folder on your computer to/home/rstudio/Workspace/
in the container. - Environment Variables:
PASSWORD
: your_password
- Name:
Click Run
to create the container.
The container should now be running. You can access RStudio by going to localhost:8787
in your web browser. Use the username rstudio
and the password you set in the environment variables to log in.
If you encounter any issues, please report them to the instructor or the TA. We will be happy to help you troubleshoot any problems you encounter.
Footnotes
-
If the previous folder does not exist, create a new folder for this container and map it to
/home/rstudio/Workspace/
in the container. After you create the container, you can copy the files from the old folder to the new folder. ↩