This note will provide detailed steps and instructions to install Docker and signup for a DockerHub account on Windows with WSL2. We will need a DockerHub account so that we can pull images and push the images we will build.
Windows
10 & 11 users will be able to install Docker Desktop if their computer
supports the Windows Subsystem for Linux (WSL2).
- Register for a
DockerHub account
Visit the link below to register for a DockerHub account (this is free)
- Download and install all pending Windows OS updates
- Run the
WSL install script
Note - If you have previously enabled WSL you may skip
to step #6
Open PowerShell as Administrator and run the wsl --install command. This will enable and install all required features as
well as install Ubuntu.
Official documentation:
https://docs.microsoft.com/en-us/windows/wsl/install#install-wsl-command
- Reboot your computer
- Set a Username and Password
in Ubuntu
After the reboot, Windows will auto-launch your new Ubuntu OS and prompt you to set a username and password.
- Install Docker
Desktop
Navigate to the Docker Desktop installation page and click the Docker
Desktop for Windows button:
https://docs.docker.com/desktop/install/windows-install/
- Double-click the
Docker Desktop Installer from your Downloads folder
- Click "Install anyway"
if warned the app isn't Microsoft-verified
- Click
"OK" to Add a shortcut to the Desktop
- Click "Close" when you see Installation succeeded message
- Double-click the
Docker Desktop icon on your Desktop
- Accept the Docker
Service Agreement
- Docker Desktop will
launch for the first time
Docker Desktop will launch and present you with a tutorial. You are free
to skip this.
- Open the WSL terminal
Using the Windows Search feature in the toolbar, type wsl and
click Open
- Check that Docker is working
Using the WSL terminal, run the docker command. If all is well you should see some
helpful instructions in the output similar to below.
- Log in to Docker
Using the WSL terminal run the docker
login command. You will be
prompted to enter the username and password (or your Personal Access Token) you
created earlier when registering for a DockerHub account.
Once you see Login Succeeded, the setup is complete and you are free to continue to the next lecture.
A significant difference when using WSL is that you will need to create and run your project files from within the Linux filesystem, not the Windows filesystem. This will be very important in later lectures when we cover volumes.
You can
access your Linux system by running wsl in the Windows Search Bar. The wsl terminal
will automatically open to the /mnt/c/Windows/System32 location.
This is still the Windows filesystem! You will need to run the cd ~ command to change into your Ubuntu user's home directory on the
Linux filesystem.
All Docker commands should be run within WSL and not on the Windows file system.
(Article Reference: Stephen Grider Udemy Course)
Wow, this is really informative!
ReplyDeleteIf you're serious about investing in cryptocurrencies, you need a trustworthy exchange like Opris to make sure your transactions are safe and secure. As a leading provider of cryptocurrency exchange software , Opris offers top-of-the-line security measures, user-friendly interfaces, and a wide range of trading options to meet the needs of all types of investors.
paxful clone script
binance clone script
coinbase clone script
kucoinnclone script
wazirx clone script
kraken clone script
huobi clone script