PowerShell Script ile Docker EE Kurulumu

%3CLINGO-SUB%20id%3D%22lingo-sub-1905861%22%20slang%3D%22en-US%22%3EPowerShell%20Script%20ile%20Docker%20EE%20Kurulumu%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1905861%22%20slang%3D%22en-US%22%3E%3CP%3EDocker%20kurulumunu%20Windows%20Core%20%C3%BCzerinde%20yapacaksan%C4%B1z%20%C3%B6zelikle%20size%20%C3%A7ok%20faydal%C4%B1%20olacak%20a%C5%9Fa%C4%9F%C4%B1daki%20komutlar%C4%B1%20kullanabilirsiniz.%20%C3%96ncesinde%20Docker.com%20%C3%BCzerinden%20ilgili%20paketlerimizi%20indiriyoruz.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EPS%20C%3A%5CUsers%5CAdministrator%26gt%3B%20invoke-webrequest%20-UseBasicparsing%20-Outfile%20docker-17.06.2-ee-7.zip%20https%3A%2F%2Fdownload.docker.com%2Fcomponents%2Fengine%2Fwindows-server%2F17.06%2Fdocker-17.06.2-ee-7.zip%20%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEkran%20%C3%87%C4%B1kt%C4%B1s%C4%B1%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EWindows%20PowerShell%0ACopyright%20(C)%20Microsoft%20Corporation.%20All%20rights%20reserved.%0A%20%0A%20Writing%20web%20request%0A%20%20%20%20Writing%20request%20stream...%20(Number%20of%20bytes%20written%3A%208431026)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%C4%B0ndirdi%C4%9Fimiz%20zip%20dosyas%C4%B1n%C4%B1%20a%C3%A7arak%20iligli%20dizine%20kaydetmek%20i%C3%A7in%20a%C5%9Fa%C4%9F%C4%B1daki%20komutumuzu%20kullan%C4%B1yoruz.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EPS%20C%3A%5CUsers%5CAdministrator%26gt%3B%20Expand-Archive%20docker-17.06.2-ee-7.zip%20-DestinationPath%20%24Env%3A%20ProgramFiles%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%C4%B0ndirdi%C4%9Fimiz%20zip%20dosyas%C4%B1n%C4%B1%20silmek%20i%C3%A7ina%C5%9Fa%C4%9F%C4%B1daki%20komutu%20kullanabilirisniz.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EPS%20C%3A%5CUsers%5CAdministrator%26gt%3B%20Remove-Item%20-Force%20docker-17.06.2-ee-7.zip%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EContainer%20role%20y%C3%BCklemek%20i%C3%A7in%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EPS%20C%3A%5CUsers%5CAdministrator%26gt%3B%20%24null%20%3D%20Install-WindowsFeature%20containers%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEkran%20%C3%87%C4%B1kt%C4%B1s%C4%B1%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EWindows%20PowerShell%0ACopyright%20(C)%20Microsoft%20Corporation.%20All%20rights%20reserved.%0A%20%0A%20Start%20Installation...%0A%20%20%20%2026%25%0A%20%20%20%20%5Booooooooooooooooooo%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%0A%20%0APS%20C%3A%5CUsers%5CAdministrator%26gt%3B%0APS%20C%3A%5CUsers%5CAdministrator%26gt%3B%20%24null%20%3D%20Install-WindowsFeature%20containers%3C%2FCODE%3E%3C%2FPRE%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EPS%20C%3A%5CUsers%5CAdministrator%26gt%3B%20%24null%20%3D%20Install-WindowsFeature%20containers%0AWARNING%3A%20You%20must%20restart%20this%20server%20to%20finish%20the%20installation%20process.%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EY%C3%BCkleme%20tamamland%C4%B1.%20Sistemi%20yeninden%20ba%C5%9Flatman%C4%B1z%20gerekiyor.%3C%2FP%3E%3CP%3ESistemi%20yeniden%20ba%C5%9Flatt%C4%B1ktan%20sonra%20docker%20servislerini%20%C3%A7al%C4%B1%C5%9Ft%C4%B1r%C4%B1yoruz.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EWindows%20PowerShell%0ACopyright%20(C)%20Microsoft%20Corporation.%20All%20rights%20reserved.%0A%20%0APS%20C%3A%5CUsers%5CAdministrator%26gt%3B%20%24env%3Apath%20%2B%3D%20%22%3B%24env%3AProgramFiles%5Cdocker%22%0APS%20C%3A%5CUsers%5CAdministrator%26gt%3B%0APS%20C%3A%5CUsers%5CAdministrator%26gt%3B%20dockerd%20--register-service%0APS%20C%3A%5CUsers%5CAdministrator%26gt%3B%0APS%20C%3A%5CUsers%5CAdministrator%26gt%3B%20Start-Service%20docker%0APS%20C%3A%5CUsers%5CAdministrator%26gt%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESon%20olarak%20docker%20%C3%A7al%C4%B1%C5%9Ft%C4%B1r%C4%B1yoruz.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EPS%20C%3A%5CUsers%5CAdministrator%26gt%3B%20docker%20container%20run%20hello-world%3Ananoserver%0AUnable%20to%20find%20image%20'hello-world%3Ananoserver'%20locally%0Ananoserver%3A%20Pulling%20from%20library%2Fhello-world%0A6a5e981230da%3A%20Pull%20complete%0Adc4b656f6979%3A%20Pull%20complete%0A2848c5402b33%3A%20Pull%20complete%0A9e0171b11ac8%3A%20Pull%20complete%0ADigest%3A%20sha256%3Aea56d430e69850b80cd4969b2cbb891db83890c7bb79f29ae81f3d0b47a58dd9%0AStatus%3A%20Downloaded%20newer%20image%20for%20hello-world%3Ananoserver%0A%20%0AHello%20from%20Docker!%0AThis%20message%20shows%20that%20your%20installation%20appears%20to%20be%20working%20correctly.%0A%20%0ATo%20generate%20this%20message%2C%20Docker%20took%20the%20following%20steps%3A%0A%201.%20The%20Docker%20client%20contacted%20the%20Docker%20daemon.%0A%202.%20The%20Docker%20daemon%20pulled%20the%20%22hello-world%22%20image%20from%20the%20Docker%20Hub.%0A%20%20%20%20(windows-amd64%2C%20nanoserver-1809)%0A%203.%20The%20Docker%20daemon%20created%20a%20new%20container%20from%20that%20image%20which%20runs%20the%0A%20%20%20%20executable%20that%20produces%20the%20output%20you%20are%20currently%20reading.%0A%204.%20The%20Docker%20daemon%20streamed%20that%20output%20to%20the%20Docker%20client%2C%20which%20sent%20it%0A%20%20%20%20to%20your%20terminal.%0A%20%0ATo%20try%20something%20more%20ambitious%2C%20you%20can%20run%20a%20Windows%20Server%20container%20with%3A%0A%20PS%20C%3A%5C%26gt%3B%20docker%20run%20-it%20mcr.microsoft.com%2Fwindows%2Fservercore%20powershell%0A%20%0AShare%20images%2C%20automate%20workflows%2C%20and%20more%20with%20a%20free%20Docker%20ID%3A%0A%20https%3A%2F%2Fhub.docker.com%2F%20Jump%0A%20%0AFor%20more%20examples%20and%20ideas%2C%20visit%3A%0A%20https%3A%2F%2Fdocs.docker.com%2Fget-started%2F%20%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKaynak%3A%20docker.com%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1905861%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Contributor

Docker kurulumunu Windows Core üzerinde yapacaksanız özelikle size çok faydalı olacak aşağıdaki komutları kullanabilirsiniz. Öncesinde Docker.com üzerinden ilgili paketlerimizi indiriyoruz.

 

 

PS C:\Users\Administrator> invoke-webrequest -UseBasicparsing -Outfile docker-17.06.2-ee-7.zip https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-7.zip 

 

Ekran Çıktısı:

 

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
 
 Writing web request
    Writing request stream... (Number of bytes written: 8431026)

 

İndirdiğimiz zip dosyasını açarak iligli dizine kaydetmek için aşağıdaki komutumuzu kullanıyoruz.

 

PS C:\Users\Administrator> Expand-Archive docker-17.06.2-ee-7.zip -DestinationPath $Env: ProgramFiles

 

İndirdiğimiz zip dosyasını silmek içinaşağıdaki komutu kullanabilirisniz.

 

PS C:\Users\Administrator> Remove-Item -Force docker-17.06.2-ee-7.zip

 

Container role yüklemek için

 

PS C:\Users\Administrator> $null = Install-WindowsFeature containers

 

Ekran Çıktısı:

 

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
 
 Start Installation...
    26%
    [ooooooooooooooooooo                                                         ]
 
 
PS C:\Users\Administrator>
PS C:\Users\Administrator> $null = Install-WindowsFeature containers
PS C:\Users\Administrator> $null = Install-WindowsFeature containers
WARNING: You must restart this server to finish the installation process.

 

Yükleme tamamlandı. Sistemi yeninden başlatmanız gerekiyor.

Sistemi yeniden başlattıktan sonra docker servislerini çalıştırıyoruz.

 

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
 
PS C:\Users\Administrator> $env:path += ";$env:ProgramFiles\docker"
PS C:\Users\Administrator>
PS C:\Users\Administrator> dockerd --register-service
PS C:\Users\Administrator>
PS C:\Users\Administrator> Start-Service docker
PS C:\Users\Administrator>

 

Son olarak docker çalıştırıyoruz.

 

PS C:\Users\Administrator> docker container run hello-world:nanoserver
Unable to find image 'hello-world:nanoserver' locally
nanoserver: Pulling from library/hello-world
6a5e981230da: Pull complete
dc4b656f6979: Pull complete
2848c5402b33: Pull complete
9e0171b11ac8: Pull complete
Digest: sha256:ea56d430e69850b80cd4969b2cbb891db83890c7bb79f29ae81f3d0b47a58dd9
Status: Downloaded newer image for hello-world:nanoserver
 
Hello from Docker!
This message shows that your installation appears to be working correctly.
 
To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (windows-amd64, nanoserver-1809)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.
 
To try something more ambitious, you can run a Windows Server container with:
 PS C:\> docker run -it mcr.microsoft.com/windows/servercore powershell
 
Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/ Jump
 
For more examples and ideas, visit:
 https://docs.docker.com/get-started/ 

 

Kaynak: docker.com

 

 

 

 

0 Replies