Step by Step Guide
Docker install කිරීම developerලාට container-based development environment එකක් setup කරන්න ප්රධාන step එකක්.
මෙම guide එකෙන් අපි බලන්නේ:
Docker install කිරීමට පෙර computer එකේ minimum requirements කිහිපයක් තියෙනවා.
Docker officially support කරන OS:
Windows usersලාට Docker install කරන්න පහසුම method එක තමයි Docker Desktop භාවිතා කිරීම.
මුලින්ම Docker official website එකට යන්න.
Download Docker Desktop for Windowsඑතනින් Docker Desktop for Windows download කරන්න.
Download කරපු file එක run කරන්න.
Installer open වුනාම:
Installation process එක start වෙනවා.
Installation complete වුනාම system restart කරන්න.
IRestart වුනාම Docker Desktop automatically start වෙනවා.
Command Prompt හෝ PowerShell open කරලා මේ command එක run කරන්න.
docker --version
Output example:
Docker version 25.x.x
එහෙම output එකක් ලැබුණොත් Docker successfully install වෙලා තියෙනවා.
Linux usersලාට Docker install කරන්න terminal එකෙන් commands භාවිතා කරනවා. මෙතන Ubuntu example එකක්.
sudo apt update
sudo apt upgrade
මේ command එකෙන් system update කරලා latest packages install කරගන්න.
sudo apt install apt-transport-https ca-certificates curl software-properties-common
මෙම packages Docker install කිරීම සඳහා අවශ්ය වෙනවා.
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
මෙය Docker repository authenticate කිරීමට භාවිතා කරන key එක.
sudo add-apt-repository \
"deb https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
මෙම step එක Docker official repository system එකට add කරනවා.
sudo apt update
sudo apt install docker-ce
මෙම command එක Docker Engine install කරනවා.
sudo systemctl status docker
මෙම command එක Docker service එක run වෙනවාද check කරනවා.
Active (running) status එකක් ලැබුණොත් Docker successfully install වෙලා තියෙනවා.
Mac usersලාටත් Docker Desktop භාවිතා කරලා install කරන්න පුළුවන්.
Mac version එක download කරන්න. Apple Silicon (M1/M2/M3) සහ Intel versions දෙකක් තියෙනවා. ගැලපෙන version එක තෝරන්න.
Download කරන ලද .dmg file එක open කරන්න. Docker icon එක Applications folder එකට drag කරන්න.
Applications → Docker Desktop open කරන්න. First time run කරනකොට permissions request කරනවා. Allow කරන්න.
Terminal open කරලා මේ command එක run කරන්න.
docker run hello-world
Output එකේ "Hello from Docker!" කියලා message එකක් ලැබුණොත් Docker successfully install වෙලා තියෙනවා.
මෙම command එක:
Output example:
Hello from Docker!
This message shows that your installation appears to be working correctly.
Docker install කිරීම container-based development environment එකක් setup කරන ප්රධාන step එකක්. Docker successfully install කරගත්තට පස්සේ developerලාට portable, scalable සහ efficient applications build කරන්න පුළුවන්.