Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ซอฟต์แวร์ >> เครื่องเสมือน

Docker บน Windows 10: คู่มือครบสำหรับผู้เริ่มต้น

Docker รถ media wave สักพัก masterfully managing crests/dips tech ocean excellent balance technology, service, business, accessibility สำหรับผู้ที่ lusting new rave of containers synonymous with latter recently stepped deeper commercial world offering orchestration mechanisms companies crave Next logical step? Windows

Container mechanism works Windows guarantees more attention serious grown-up adult attention businesses/enterprises especially if cannot commit cloud/Linux journey easily Which is why Docker now available as beta demonstrator both Windows server/client editions Article: intro guide getting started Docker Microsoft world

First Steps, Prerequisites

Several things consider: Docker is Docker Familiar framework/basic usage = all need get containers running Windows Need help consult thorough guide how use Docker Originally Linux commands fully apply here While busy reading might want check supervisord/networking tutorials too Soon new refreshed article Docker latest capabilities/features another time

Two: Docker requires Hyper-V run natively system 64-bit pro/server edition Windows 10 In my case only Home version available test Docker Toolbox edition designed work around limitations native support by running headless VirtualBox engine background

(ภาพประกอบ)

Toolbox edition fairly simple setup Install quickstart option system menu prep environment configure SSH keys few details somewhat unsurprisingly similar Vagrant setup while ago

(ภาพประกอบ)

Docker guys really have a knack for attention to detail - including logos. This is why they will get bought one day and make a staggering amount of money by making an existing technology more accessible to the masses. Magic.

(ภาพประกอบ)

Setup may take a while IO-intensive Let complete then have shell run Docker commands typical Linux box More about that in a jiffy

(ภาพประกอบ)

Manual Service Configuration & Errors

Tempted run Powershell hammer Docker commands Unfortunately won't work unless Docker service installed Can be done but service fail start unless Windows Server edition In detail how do that or rather not

(ภาพประกอบ)

Next logical step: pull down image but big ugly error Briefly mentioned: service not natively installed

PS C:\Users\Roger Bodger> docker pull centos:7
Warning: failed to get default registry endpoint from daemon (An error occurred trying to connect: Get https://%2F%2F.%2F
pipe%2Fdocker_engine/v1.23/info: open //./pipe/docker_engine: The system cannot find the file specified.). Using system default: https://index.docker.io/v1/
An error occurred trying to connect: Post https://%2F%2F.%2Fpipe%2Fdocker_engine/v1.23/images/create?
fromImage=centos%3A7: open //./pipe/docker_engine: The system cannot find the file specified.

May try resolve searching error online configuring daemon yourself Exercise works except last step Try start Docker service fails

(ภาพประกอบ)

PS C:\Program Files\docker> Start-Service docker
Start-Service : Failed to start service 'Docker Engine (docker)'.
At line:1 char:1
+ Start-Service docker
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.ServiceProcess.
ServiceController:
SeCommandException
+ FullyQualifiedErrorId : StartServiceFailed,Microsoft.
PowerShell.Commands.Star

Reason simple (Event Log):

fatal: Error starting daemon: The Windows daemon requires Windows Server 2016 Technical Preview 5 build 14300 or later

Using Docker on Windows 10

Fun part Usage model identical what taught in past New Docker version includes extra commands/features not reviewed yet but rest works perfectly Follow tutorial instances up running within seconds including containerized Apache/ssh

(ภาพประกอบ)

From this point on Bob's your uncle

สรุป (Conclusion)

Pleased with Windows port both native implementation and toolbox allows more people try/explore Docker Tested latter report does as advertised Framework behaved well ran fast no big overhead no big issues/bugs/errors

Essence: same old Docker we know beauty of it If runs same Windows as Linux gives serious users real incentive develop cross-platform applications won't break moving between OSes Theory at least We all know 99% software single-threaded containers long way before reality serious application use But very least Docker guys really helping journey Windows 10 enablement another cool feature long string successes I like Explore more come back handful new exciting buzzwords tutorials See ya.

Cheers.