1

I have a Docker image with the ASP.NET dependencies added and a website with a single index.html.

The DockerFile is:

# escape=`
FROM iis-with-asp
ADD ./Ping C:/Ping
RUN ["C:\\Windows\\System32\\icacls.exe", "\"C:\\Ping\"", "/grant", "\"IIS AppPool\\DefaultAppPool\":(OI)(CI)", "/T"]
RUN ["C:\\Windows\\System32\\icacls.exe", "\"C:\\Ping\"", "/grant", "\"IIS_IUSRS\":(OI)(CI)", "/T"]
RUN ["C:\\Windows\\System32\\icacls.exe", "\"C:\\Ping\"", "/grant", "\"Network Service\":(OI)(CI)", "/T"]
RUN ["\\Windows\\system32\\inetsrv\\AppCmd.exe", "add",  "sites",  "/name:\"Ping\"", "/id:2", "/bindings:http://localhost:9000", "/physicalPath:C:\\Ping"]
EXPOSE 9000
RUN ["\\Windows\\system32\\inetsrv\\AppCmd.exe", "list", "site"]

It's build with:

docker build -t u .

and running it with:

docker run -p 9000:9000 u

When I hit http://localhost:9000 with Fiddler I get a 409 though.

BanksySan
  • 27,362
  • 33
  • 117
  • 216

1 Answers1

0

your exposing 9000 port to host machine, you should access with 9000 port only but make sure that you're exporting correct application port. ex: (host machine)9000:5000(app port)

Ashok Reddy
  • 1,060
  • 1
  • 16
  • 28