powershell ile docker kurulumu
1 TopicPowerShell ile Docker EE kurulumu (tr-TR)
Windows Server 2016 ile hayatımıza giren container özelliğinden sizlere biraz bahsetmek ve Windows Server 2019 üzerinde container teknolojisinin öncüsü olan docker kurulumunun nasıl yapacağınızı size anlatmak isterim. Sanallaştırma teknolojisinin ardından gündemimize hızlı bir giriş yapan container mimarisi özelikle yazılımcıların çok kısa sürede vazgeçilmesi olmaya başlamıştır. Aynı işletim sistemi içerisinde aynı kaynakları kullanarak oluşturulan ve ihtiyaç durumunda kaynakların çok rahat azaltılarak yada arttırılabilen bir alt yapıya sahip olan container teknolojisi kendi dosya sistemi, registry ve ağ adreslerine sahip olabildiği için diğer uygulamalardan da izole bir şekilde çalışma imkanı sunmaktadır. Esnek kullanım yapısı ile uygulama geliştiricilerin tercih sebebi olmuştur. Peki bu container role kurulumu nasıl yapılır sunucuda nasıl aktif edilir birlikte bakalım. Container role kurulumunu docker ile eş zamanlı sizlere anlatmaya çalışacağım. Docker EE Kurulumu Modul kurulumu için "Install-Module" komutu ile kuruluma başlıyoruz. Install-Module DockerMsftProvider -Force Ekran çıktısı: PS C:\Users\Administrator> Install-Module DockerMsftProvider -Force NuGet provider is required to continue PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or 'C:\Users\Administrator\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install and import the NuGet provider now? [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"):Y Docker paketlerini yüklemek için "Install-Package" komutunu kullanıyoruz. Install-Package Docker -ProviderName DockerMsftProvider -Force Ekran Çıktısı: PS C:\Users\Administrator> Install-Package Docker -ProviderName DockerMsftProvider -Force WARNING: A restart is required to enable the containers feature. Please restart your machine. Name Version Source Summary ---- ------- ------ ------- Docker 18.09.4 DockerDefault Contains Docker EE ... Docker çalıştımak için docker container run hello-world:nanoserver 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/2KViews1like0Comments