Open6

DockerでIIS+ClassicASP環境構築

カズマルカズマル

イメージのビルド

docker build -t iis/classic-asp:1.0 .

インストール時間が長い・・・(30分くらい)。

PS D:\dev\wwwroot> docker build -t iis/classic-asp:1.0 .
Sending build context to Docker daemon  3.072kB
Step 1/5 : FROM mcr.microsoft.com/windows/servercore/iis:windowsservercore-20H2
windowsservercore-20H2: Pulling from windows/servercore/iis
18ae6bebe21d: Pull complete
a4daf907fbf2: Pull complete
773bd32159a8: Pull complete
121d90586d44: Pull complete
afe5fa09ddc1: Pull complete
Digest: sha256:e82a2438b96419bea02574b15fcf4e88284060e734730e512e98ce2764a85d1b
Status: Downloaded newer image for mcr.microsoft.com/windows/servercore/iis:windowsservercore-20H2  
 ---> a203326fabbe
Step 2/5 : RUN powershell -NoProfile -Command Remove-Item -Recurse C:\inetpub\wwwroot\*
 ---> Running in 8deb61d04c99
Removing intermediate container 8deb61d04c99
 ---> 306cc4bf9d7d
Step 3/5 : WORKDIR /inetpub/wwwroot
 ---> Running in d4c5bc9a761a
Removing intermediate container d4c5bc9a761a
 ---> 0f251ebc3d40
Step 4/5 : RUN powershell -NoProfile -Command Install-WindowsFeature Web-ASP
 ---> Running in 0da54bb42cac

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
True    No             Success        {Application Development, ASP, ISAPI E...


Removing intermediate container 0da54bb42cac
 ---> bbf366ecb1a6
Step 5/5 : COPY index.asp .
 ---> 9ec57a02eaa4
Successfully built 9ec57a02eaa4
Successfully tagged iis/classic-asp:1.0

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
PS D:\dev\wwwroot>

カズマルカズマル

内部IPアドレス確認

docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" iis-asp-test   
172.26.245.183