-
Notifications
You must be signed in to change notification settings - Fork 7
How to Install Docker
Eric Au edited this page May 25, 2022
·
2 revisions
- Follow this link Here. You will need to figure out which chip your mac runs on. I'm on the M1 chip, but I think mostly everyone should be on the intel chip if you are still using the same computers from when I was around. Follow the instructions here.
- Click the "Get Docker" or "Get Docker Desktop for Mac (Stable)" button.
- Double-click the DMG
- Drag Docker into Applications, then open Docker
- Open Terminal after the install and it should auto-launch on startups and be available on command line.
Quick sanity check to make sure you installed it correctly is to run the following commands. if you don't notice any errors from the docker image ls you didn't mess up.
docker image ls
# or
docker run hello-world
brew install docker
I don't recommend going the brew route because brew sets up a bunch of soft links and I have little knowledge about how brew sets up docker on your machine.
- Finally you need to set up a certificate on your macbook
openssl genrsa -out client.key 4096
openssl req -new -x509 -text -key client.key -out client.cert
Just run these lines of code lol. It basically updates your machine then you need to add yourself as an authenticated user.
sudo apt-get update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt install docker-ce docker-ce-cli containerd.io
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
sudo chmod g+rwx "$HOME/.docker" -R
sudo systemctl enable docker.service
sudo systemctl enable containerd.service
I know some people in lab are on windows and unfortunately I've only done this once and I probably won't ever have to again, but just google it, it follows the same set up. install on windows