Sign inSign up

kvriel/microsoft-iis-sql

By kvriel

•Updated about 7 years ago

Microsoft IIS SQL images

Image
0

1.6K

kvriel/microsoft-iis-sql repository overview

⁠About This Image

Internet Information Services (IIS) for Windows® Server is a flexible, secure and manageable Web server, combined with Microsoft SQL Express for hosting anything on the Web.

⁠How to use this image?

⁠Create a Dockerfile with your website and database


FROM kvriel/microsoft-iis-sql

RUN powershell -NoProfile -Command Remove-Item -Recurse C:\inetpub\wwwroot*

WORKDIR /inetpub/wwwroot

COPY content/ .

SHELL ["powershell", "-NoProfile", "-Command", "$ErrorActionPreference = 'Stop';"]

RUN Set-StrictMode -Version latest ;
Invoke-Sqlcmd -Query "ALTER LOGIN sa with password='{password}'; ALTER LOGIN sa ENABLE;" -ServerInstance "." ;
Invoke-Sqlcmd -Query "CREATE DATABASE {database} ON (FILENAME = 'C:{database}.mdf') FOR ATTACH_REBUILD_LOG ;" -ServerInstance "." ;

ENTRYPOINT ["C:\ServiceMonitor.exe", "w3svc"]

You can then build and run the Docker image:


$ docker build -t iis-sql-site .

$ docker run -d -p 80:80 --name my-running-site iis-sql-site

You need to specify an ENTRYPOINT in your Dockerfile since the kvriel/microsoft-iis-sql base image does not includes an entrypoint application that monitors the status of the IIS World Wide Web Publishing Service (W3SVC).

Tag summary

Content type

Image

Digest

Size

3 GB

Last updated

about 7 years ago

docker pull kvriel/microsoft-iis-sql