You can no longer use the Docker website to install Linux versions of docker. You must use the command line. Here are the support pages for Docker CE with several distros:
Adding your Username to the "docker" group will not allow you to run Docker commands without SUDO access if you are on an Enterprise Linux Distro including: RHEL, CentOS, or Fedora.
sudo usermod -aG docker $USER
sudo curl -L https://github.com/docker/compose/releases/download/v2.26.1/docker-compose-linux-x86_64 > /usr/libexec/docker/cli-plugins/docker-compose
sudo chmod 755 /usr/libexec/docker/cli-plugins/docker-compose
Get started with Docker containers on WSL
Using WSL 2, you can build and deploy dockerized apps on Windows 10 and 11.
Install WSL
- Open a PowerShell as Administrator and run the following command:
wsl --install
You can use wsl --set-version
to use a different version of WSL, but new Linux Installations will always use the latest stable version of WSL.
- Restart your computer.
- Set up your Linux username and password. More information here. The username and password are specific to each distribution of linux you install. You can change the password later using
passwd
.
- Update and upgrade packages using the following command:
sudo apt update && sudo apt upgrade
Windows Terminal is a newer alternative to PowerShell and Command Prompt that offers the ability to run multiple terminal instances that support several types of shells. It is recommended to use Windows Terminal while working with WSL and especially Docker.
Install Windows Terminal here.
Download Docker Desktop
- Install Docker Desktop here.
- You may have to sign out and sign back in once installation completes.
- Sign in to Docker Hub at the top of the application.
- Go to Settings → General and make sure “Use WSL 2 based engine…” is selected.
Once Docker is running, right click the docker icon in the task bar and click "Settings".
- Go to "Shared Drives" and check the drive(s) that you will use to store code.
- (Optional) Go to "Advanced" and allocate more CPUs or Memory accordingly.
- Click Apply and restart docker.
Docker is available for MacOS Yosemite (10.3) and later. For older versions of MacOS, you will need to use docker-machine.
- Go to store.docker.com, go to the Community Edition Section (CE) and click the Docker Community Edition for Mac.
- Click Get Docker to get the default stable version. To get the edge version, scroll down and click the appropriate version.
- Double click the Docker.dmg file.
- Drag the Docker.app to the Applications folder.
- Launch the app.
Once Docker is running, click the docker icon in the tool bar and click "Preferences:".
- Go to "File Sharing" and ensure that your code will be written in one of the directories in the listing. For most projects, you will probably use files under "/Users", but if you have your own custom root directory, you will need to add it in this table.
- (Optional) Go to "Advanced" and allocate more CPUs or Memory accordingly.
- Click Apply and Restart.