70-740, Teil 4.1.1. Installationsanforderungen und angemessene Szenarien für Windows-Container bestimmen

70-740, Teil 4.1.1.

Installationsanforderungen und angemessene Szenarien für Windows-Container bestimmen

Ideen für die Recherche im Web:

Zum Nachschlagen:

Übungen:

###Webserver

docker pull nanoserver/iis

docker images

docker network ls

docker run –name nanoiis -d -it –network=a3915bd49ae0 nanoserver/iis

docker ps -a -f status=running

docker inspect -f „{{ .NetworkSettings.Networks.nat.IPAddress }}“ nanoiis

docker inspect c6c1e131bc165a55a835a568bd33fe76a43ee2402f9a5239988d58021b511906

docker inspect –format=“{{.Id}}“ nanoiis

docker ps -a -f status=running

$container_nanoiis= docker inspect –format=“{{.Id}}“ nanoiis

$sesion = New-PSSession -ContainerId $container_nanoiis -RunAsAdministrator

Enter-PSSession -Session $sesion

ipconfig /all

Exit-PSSession

Invoke-Command -Session $sesion -ScriptBlock {ipconfig /all}

# ie http://10.102.4.8/

dir C:\inetpub\wwwroot\

Copy-Item -Path C:/Container\default.html -Destination C:\inetpub\wwwroot\iisstart.htm -ToSession $sesion

$ie = New-Object -ComObject InternetExplorer.Application

$ie.Navigate2(„http://10.102.4.8“)

$ie.Visible = $true

docker stop nanoiis

docker rm nanoiis

docker ps

###Wordpress

docker pull nanoserver/iis-mysql-php-wordpress

docker images

docker network ls

docker run –name wordpress -d -it –network=a3915bd49ae0 nanoserver/iis-mysql-php-wordpress

#Bei Bedarf
#docker ps
#docker stop wordpress
#docker stop 22cb01a9de752960860a5054bd19237963ec0dd0ce3fd05c33890e224a7d2c56
#docker rm 22cb01a9de752960860a5054bd19237963ec0dd0ce3fd05c33890e224a7d2c56
#docker rm wordpress
#docker ps

docker ps -a -f status=running

docker inspect –format=“{{.Id}}“ wordpress

$container_id_wordpress = docker inspect –format=“{{.Id}}“ wordpress

echo $container_id_wordpress

docker ps -a -f status=running

Invoke-Command -Session $session -ScriptBlock {ipconfig /all}

#Alternativ:

#$session = New-PSSession -ContainerId $container_id_wordpress -RunAsAdministrator

#Enter-PSSession -Session $session

#ipconfig /all

#Exit-PSSession

$ie = New-Object -ComObject InternetExplorer.Application

$ie.Navigate2(„http://10.102.4.17“)

$ie.Visible = $true

docker stop wordpress

docker rm wordpress

docker ps