Forum Discussion

emreozanmemis's avatar
emreozanmemis
Steel Contributor
Nov 19, 2020

PowerShell Script ile Docker EE Kurulumu

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

 

 

 

 

No RepliesBe the first to reply

Resources