Summary

Instructions to install Docker on macOS for which user does not have Admin privileges. These instructions are meant for iMacs in Biochem 201 but should work elsewhere.

Procedure

  1. download Docker Desktop
  2. create local Applications directory
  3. launch and uncheck options requiring admin password

Optional: register with Docker

Docker web site

  1. Go to docker.com and click “Get Started” button at the top right.
  2. Download Docker for Mac. Select appropriate version: “Apple Chip” or “Intel Chip”
Click GetStarted and download Chip version.

Click GetStarted and download Chip version.

  1. Double-click on the downloaded file Docker.dmg. This will open a window suggesting to copy the Docker icon onto the Applications folder. However, this action would require Admin privileges.
Do not move there unless you have Admin privileges.

Do not move there unless you have Admin privileges.

macOS

The easiest way to install applications is to create a new folder within your username area, which can also be called Applications.

One way is to right-click and request a new directory.

Create an Applications directory in your Users home.

Create an Applications directory in your Users home.

  1. Copy the Docker icon into the Applications folder just created.

Docker Desktop installation

  1. Double click on the Docker icon
  2. If asked “…Are you sure you want to open it?” click on “Open” button
Click Open button to confirm.

Click Open button to confirm.

  1. Select non-Admin settings from the presented window.
Select Use Advanced Settings.

Select Use Advanced Settings.

  1. In the next option offered unselect System and choose User button.
  2. Uncheck the next 2 options that require password.
Select User and uncheck options requiring password. Click Finish.

Select User and uncheck options requiring password. Click Finish.

  1. on the next panel, choose “Sign-in” if you created a Docker user previously, or select “Continue without signing in”.
Log-in or continue without signing in.

Log-in or continue without signing in.

  1. Fill-in or Skip the short survey.

  2. Docker is now ready to use. Check that the engine is running at the bottom left of the main window.

Check that engine is running.

Check that engine is running.

A top-menu icon is available to access Docker Desktop, offering detailed menus.

Top menu icon.

Top menu icon.

Terminal

It is important to follow the instructions given above within the User settings to provide the necessary information to macOS since the Users Applications folder we created is not in a standard location.

The instructions were: You need to manually add $HOME/.docker/bin to your PATH.

Unfortunately, the “Learn more” link does not contain the clear instructions needed, which are detailed below.

To make this a permanent change, the instruction has to be added to a hidden file specific to the shell used. On newer macOS, the default shell is zsh but some users keep the older bash option. Select below the command matching your shell.

Start by opening Terminal and inquire which shell it is using:

echo $SHELL

The answer may be either /bin/bash or /bin/zsh

Add the command to the “resource” file with the command below mathing the shell in use:

# for bash
echo "export PATH=$HOME/.docker/bin:$PATH" >> ~/.bashrc

# for zsh
echo "export PATH=$HOME/.docker/bin:$PATH" >> ~/.zshrc

This means that this line will be activated the next time a Terminal is open.

Docker is now ready to be used with the usual commands.