पाठ 2 / 26

डॉकर इंस्टॉल करना

अपनी मशीन पर Docker Desktop या Engine लें और जाँचें कि यह काम कर रहा है।

Desktop बनाम Engine

Docker Desktop (Windows/macOS) में GUI, एक Linux VM, और CLI शामिल होते हैं। Linux पर आमतौर पर केवल Docker Engine इंस्टॉल होता है — डेमन और CLI, किसी अतिरिक्त VM की ज़रूरत नहीं।

इंस्टॉल जाँचें

इंस्टॉल के बाद, जाँचें कि CLI आपके PATH में है और डेमन चल रहा है।

docker --version
# Docker version 27.x.x, build xxxxxxx

docker info   # shows daemon status, containers, images, etc.

hello-world चलाएँ

सबसे आम टेस्ट — यह एक छोटी सी इमेज खींचता है और उसे चलाकर एक पुष्टि संदेश दिखाता है।

docker run hello-world

Output:

Hello from Docker!
This message shows that your installation appears to be working correctly.