-
Notifications
You must be signed in to change notification settings - Fork 84
Docker Install
This guide will assume you are using Ubuntu as your Linux distro.
These steps will apply to AWS EC2 instance users!
If you are using a different distro, then look up the install instructions for your distro.
# refresh/update your packages first
sudo apt-get update; sudo apt-get upgrade -y
# install needed tools for docker
sudo apt-get install ca-certificates curl gnupg lsb-release
# makes a directory in "/etc/apt/keyrings"
sudo mkdir -p /etc/apt/keyrings
# adds Docker's GPG key to the directory you just created
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
# adds Dockers repository
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# refresh your repositories and packages
sudo apt-get update
# install Docker and its related tools
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
# adds your user to the docker group, so you wont need to prefix docker commands with "sudo"
sudo usermod -aG docker $USER
# reload your user with the new group
exec su - $USER
# done!Use this link here:
https://docs.docker.com/desktop/mac/install/
You can install the Docker Desktop app through there.
Also I'm pretty sure there isn't the standalone Docker Engine (CLI docker), same thing for Windows users. Sorry :(
This one is a bit more complicated, because Windows is not Unix based unlike Linux and Mac. Therefore you need to install a tool called WSL
WSL (Windows Subsystem for Linux) is an amazing tool that allows you to run Linux commands on Windows systems!
Open PowerShell as admin and enter the following command:
wsl --installThis will first install WSL, and then install Ubuntu as the default distro.
- Note: you can install a different distro in the Microsoft Store, just search Linux distro you'd like to use.
You should reboot after this command completes successfully.
Once rebooted, hit the super key (the key that usually has the Windows logo on it) and search for "ubuntu". It should show you an app called "Ubuntu".
This will bring up a window which will prompt you for a username. Make sure the username is all lowercase.
When it prompts you for your password, type it in. Note that it will not show what you type for privacy/security reasons.
It will ask you to retype your password to make sure you didn't just have a stroke and forgot it.
Done!
Head to:
https://docs.docker.com/desktop/windows/install/
And follow the directions there.
After you are done installing Docker, you should head here to learn about Docker and the basics of Docker.
You should also head here to learn about Linux/bash basics.