Skip to content

Installing Docker

Ben Tudor Price edited this page Apr 12, 2023 · 7 revisions

Installing Docker

Objective

Download and install docker, configuring a container(/image?) for use throughout the course. Get better acquainted with docker.

Time Estimate

  • Estimated Time Required: 1.5
  • Actual Time Required: 2
  • Start Date: 2023/01/13
  • Finish Date: 2023/04/11

Complete

  • Install Docker
  • Play with docker and figure out some of its funcitonality.
  • Pull BCB420 image.
  • Create container and configure port forwarding & volumes.
  • Produce a functioning container.

To-Do

  • Find fix for Apple silicon bug.

Progress

  • installed docker from the website.
  • cloning image worked well.
docker pull risserlin/bcb420-base-image
  • there seems to be a warning when running the container:

"The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested"

  • Think this is something to do with my mac using apple silicon. Doesn't seem to have had any effect on the program.
  • Docker app is amazingly well designed.
  • Nevermind. Looks like this may be an issue. Continuing anyways. Will research further if I encounter performance issues.
Screenshot 2023-01-13 at 5 10 55 AM
  • Now, let's see whether I can get RStudio Working.
  • Failed.
Screenshot 2023-01-13 at 5 48 49 AM

Troubleshooting process:

  • Tried accessing via multiple browsers.
  • Tried granting docker complete file access.
  • Tried modifying cmd to include platform.
docker run --platform linux/amd64 -e PASSWORD=changeit -v /Users/ben/Desktop/BCB420:/home/rstudio/projects -p 8787:8787 risserlin/bcb420-base-image:winter2023
  • Tried removing volumes argument.
docker run --platform linux/amd64 -e PASSWORD=changeit -p 8787:8787 risserlin/bcb420-base-image:winter2023
  • Found that student on Quercus is encountering similar issue.
  • My setup is virtually complete. Just need to pin down this error, which seems to only be affecting apple silicon users.
  • Leaving this as a task for tmrw.
  • Looks like there's an error specific to Apple Silicon Macs that prevents them from connecting to Rstudio for some reason - so I've spent the course running my code from the docker by adding my project directory as a volume to the container.
  • Fiddled around and managed to build my docker file and get a functional image. $ docker build - < cust_docker
  • Work can be found at: https://github.com/bcb420-2023/BenjaminTudor_Price/tree/main/Docker

Conclusion and outlook

What did you learn, what would you do differently next time.

Clone this wiki locally