Giter Site home page Giter Site logo

iis-docker's Introduction

IIS Docker Image

IIS Docker Image

Supported Windows Server 2022 amd64 tags

docker pull mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2022

windowsservercore-ltsc2022, latest (windowsserver/Dockerfile)

Supported Windows Server 2019 amd64 tags

docker pull mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019

windowsservercore-ltsc2019, latest (windowsserver/Dockerfile)

Supported Windows Server 2016 amd64 tags

docker pull mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2016

windowsservercore-ltsc2016, latest (windowsserver/Dockerfile)

What is IIS?

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

How to use this image?

Create a Dockerfile with your website

FROM mcr.microsoft.com/windows/servercore/iis

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

WORKDIR /inetpub/wwwroot

COPY content/ .

You can then build and run the Docker image:

$ docker build -t iis-site .
$ docker run -d -p 8000:80 --name my-running-site iis-site

There is no need to specify an ENTRYPOINT in your Dockerfile since the microsoft/iis base image already includes an entrypoint application that monitors the status of the IIS World Wide Web Publishing Service (W3SVC).

Verify in the browser

On newer hosts (Windows Server, version 1803 and newer)

You can connect to the running container using http://localhost:8000 in the example shown.

On older hosts (Windows Server, version 1709 and older)

If you are running an older host, you cannot use http://localhost to browse your site from the container host. This is because of a known behavior in WinNAT and you need to use the IP address of the container.

Once the container starts, you'll need to finds its IP address so that you can connect to your running container from a browser. You use the docker inspect command to do that: docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" my-running-site You will see an output similar to this:

172.28.103.186	

You can connect the running container using the IP address and configured port, http://172.28.103.186:80 in the example shown.

In addition to static content, IIS can run other workloads including, but not limited to ASP.NET, ASP.NET Core, NodeJS, PHP, and Apache Tomcat.

For a comprehensive tutorial on running an ASP.NET app in a container, check out the tutorial on the docs site.

Supported Docker Versions

This image has been tested on Docker Versions 17.10 or higher.

License

MICROSOFT SOFTWARE SUPPLEMENTAL LICENSE TERMS

CONTAINER OS IMAGE

Microsoft Corporation (or based on where you live, one of its affiliates) (referenced as “us,” “we,” or “Microsoft”) licenses this Container OS Image supplement to you (“Supplement”). You are licensed to use this Supplement in conjunction with the underlying host operating system software (“Host Software”) solely to assist running the containers feature in the Host Software. The Host Software license terms apply to your use of the Supplement. You may not use it if you do not have a license for the Host Software. You may use this Supplement with each validly licensed copy of the Host Software.

User Feedback

If you have any issues or concerns, reach out to us through a GitHub issue.

iis-docker's People

Contributors

bariscaglar avatar drielenr avatar eriawan avatar jhkimnew avatar jimmyca15 avatar john-hart avatar lampei avatar mbrown555 avatar mcy94w avatar microsoft-github-policy-service[bot] avatar netlol avatar ning51 avatar shirhatti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iis-docker's Issues

Trying to call PS1 file with the parameters from within Docker file, but no luck.

Hi,

I have following Dockerfile where I am trying to call .PS1 file with the parameter so user can provided value against it during Docker Run command.

FROM microsoft/windowsservercore
#Also used Microsoft/iis-docker
ARG AE_HOSTNAME


COPY ./resources/* C:/automic/ARA/WebUI/
CMD powershell C:\\automic\\ARA\\WebUI\\RAW.ps1 -AE_HOSTNAME $AE_HOSTNAME

Below is the sample Powershell

Param($AE_HOSTNAME)
New-Item -ItemType directory -Path C:\$AE_HOSTNAME

I am trying to run below Docker run command once the image is built. But it fails to pass the value to ps1 file

Docker run -it -e AE_HOSTNAME=test <imageid>

However when I run without parameter, powershell executes without any issue.

Servicemonitor.exe spews a bunch of output in EntryPoint

Latest version of `microsoft/iis' image produces following output to container logs. This was not the case on previous versions

pplied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
.
.
.
.
.
Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"

Error: hard links not supported with legacy writer

D:\Dev\ > docker pull microsoft/aspnet
Using default tag: latest
latest: Pulling from microsoft/aspnet

9c7f9c7d9bc2: Pull complete
de5064718b3f: Extracting [==================================================>] 613.1 MB/613.1 MB
3abe74683942: Download complete
907e871a8de2: Download complete
ba066d7d1bad: Download complete
b8c8a13e99c3: Download complete
failed to register layer: re-exec error: exit status 1: output: hard links not supported with legacy writer

I am using:

  • Docker version 1.13.0-dev, build 2526ae3
  • Windows version Win10 (1607 - 14393.321)

Any assistance would be appreciated.

IIS docker image usage

Hi,

I have a doubt here. Can I spin up n number of IIS containers in a windows machine? Is that a violation of the windows license terms?

How do you use UI tools with Microsoft containers?

Hello,

I figured out how to use IIS manager to remotely manage IIS container by creating local username/password, adding it to Adminstrators group, installing IIS management service and configure it to allow remote connections. I can not make work any sort of remote administration tools like EventViewer for example. I suspect it's because Microsoft disabled "srvnet" service and all relevant dependencies. I understand removing may be terminal services but completely crippling all remote administration is pure craziness. This is absolutely required for image development and troubleshooting. I understand majority can be done via remoting but Microsoft raised bar too high for entrance to this space for all developers to want to come onboad. It's alrady difficult enough to persuade them to use containers but now you have to require them to learn powershell to pull eventlogs?

How may I access the web application from remote?

The docker IIS documentation says:

With the current release, you can't use http://localhost to browse your site from the container host. This is because of a known behavior in WinNAT, and will be resolved in future. Until that is addressed, you need to use the IP address of the container.

So, what is the way out to be able to publish a web application to the internet using Docker? I just tried publishing my web application. I could create docker image, publish and run it on a VM on Azure. However, I am not finding a way to share this with anyone as the web application is not available on the IP of the VM.

Can someone help me?

I would like to deploy this to ServiceFabric

I would like to deploy this to ServiceFabric. The deploy works, but I can't seem to figure out how to configure correctly to hit IIS running on port 80 in the container. Being able to create containers with our legacy web apps, and WCF services and deploy to ServiceFabric will be a game changer here. Any help would be appreciated.

the operation timed out... (containers on windows 10)

C:\WINDOWS\system32>docker run -it microsoft/iis cmd
docker: Error response from daemon: container dd196647758cf92828efd44934cb4862b4117dc4a556b20c5de8ee54c0b59d33 encountered an error during Start: failure in a Windows system call: The operation timed out because a response was not received from the Virtual Machine hosting the Container. (0xc0370109).

Can not install Application Request Routing via WebPlatformInstaller

After following the instructions for the Windows 10 Quick Start, I tried to install and configure ARR using the Web platform tools cmd.

Here is the Dockerfile that I'm using:

FROM microsoft/iis

RUN powershell -NoProfile -Command \
    Invoke-WebRequest \
    http://download.microsoft.com/download/C/F/F/CFF3A0B8-99D4-41A2-AE1A-496C08BEB904/WebPlatformInstaller_amd64_en-US.msi \
    -Outfile c:\WebPlatformInstaller_amd64_en-US.msi -UseBasicParsing

RUN c:\WebPlatformInstaller_amd64_en-US.msi

RUN mkdir C:\site

RUN powershell -NoProfile -Command \
    Import-module IISAdministration; \
    New-IISSite -Name "Site" -PhysicalPath C:\site -BindingInformation "*:8000:"

EXPOSE 8000

ADD content/ /site

But when I try to WebpiCmd /Install /Products:ARRv3_0 /AcceptEula in the container, it fails:

Starting Installation
Started downloading products...
Started downloading: 'External Cache 1.1'
Downloaded: 'External Cache 1.1'
Started downloading: 'URL Rewrite 2.0'
Downloaded: 'URL Rewrite 2.0'
Started downloading: 'Application Request Routing 3.0'
Downloaded: 'Application Request Routing 3.0'
Started installing Products...
Started installing: 'IIS: WAS Configuration API'
Started installing: '.NET 4.5 Extended with ASP.NET for Windows 8'
Started installing: 'IIS: Management Console'
Install completed (Failure): 'IIS: WAS Configuration API'
WASConfigurationAPI : Failed.

Install completed (Failure): '.NET 4.5 Extended with ASP.NET for Windows 8'
NetFx4Extended-ASPNET45 : Failed.

Install completed (Failure): 'IIS: Management Console'
IISManagementConsole : Failed.

Started installing: 'External Cache 1.1'
Install completed (Success): 'External Cache 1.1'
External Cache 1.1 : Installed
DependencyFailed : URL Rewrite 2.0
DependencyFailed : Application Request Routing 3.0

Verifying successful installation...
IIS: WAS Configuration API                         False
.NET 4.5 Extended with ASP.NET for Windows 8       False
IIS: Management Console                            False
External Cache 1.1                                 True
URL Rewrite 2.0                                    False
Application Request Routing 3.0                    False
Install of Products: FAILURE

Can anybody provide troubleshooting suggestions? There doesn't appear to be anything related in the event log.

Is there a good alternative for using WPI? That seems to be the strongly recommended way to obtain Application Request Routing, and really, any additional IIS modules.

.NET Core Windows Server Hosting bundle

The asp.net documentation https://docs.microsoft.com/en-us/aspnet/core/publishing/iis mentions that the .NET Core Windows Server Hosting bundle is needed to run a ASP.NET core application.

When trying to install the bundle via msiexe following error occures:

T h i s   i n s t a l l a t i o n   p a c k a g e   c o u l d   n o t   b e   o p e n e d .     C o n t a c t   t h e   a p p l i c at i o n   v e n d o r   t o   v e r i f y   t h a t   t h i s   i s   a   v a l i d   W i n d o w s   I n s t a l l e r   p a c k a g
e .

Cannot attached to container

Whenever I start a new container in interactive mode, I find myself stuck at the "Service 'w3svc' started" prompt and am unable to navigate away from there. Unless I Ctrl-C to stop the container.

Can I allow IIS to output detailed errors in a container running an MVC project? I only get static "Internal Server Error" without any information.

Pretty much as the title says.

As part of my internship its my job to find out if Docker is a valid solution for the company.

I have some projects that run inside a container perfectly fine after fiddling with the settings and or dockerfile, but I've been stuck for 2 weeks on one particular project right now. Every http error is the same in the sense there is no information at all where the error originates from.

All projects have the tags for errorMode=Detailed and customErrors=off in the webconfig. The traditional debugger in visual studio will give me detailed errors, but when dockerized it will give me absolutely nothing.

Thanks in advance!

Downloading: Unknown blob

Windows 7, docker toolbox 1.12.2. Going to test again with 1.13. Using the dockerfile from the readme.

$ docker -v
Docker version 1.12.2, build bb80604

$ uname -a
MINGW64_NT-6.1 2.3.0(0.290/5/3) 2015-09-29 10:48 x86_64 Msys

$ docker build -t iis-site .
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM microsoft/iis
latest: Pulling from microsoft/iis
9c7f9c7d9bc2: Retrying in 1 second
d33fff6043a1: Downloading
b7c3bbe47489: Download complete
1028e286eae2: Download complete
28e6f26ee039: Download complete
unknown blob

Binding site with current domain

Hi, I apologize, for maybe stupid question, but I'm not sure if I understand how to bind my new site, with production domain. If I create new site and register port with IP address my server, everything works well (for example: http://1.1.1.1). But how can I say, my site demo, on address server 1.1.1.1 will be accessible at www.mydemo.com. IIS without docker can solve this. Is it possible do this with this Image? Thank you.

COPY Command (Dockerfile) doesn't work / The system cannot find the path specified

Cannot build Docker images on Windows

COPY or ADD doesn't work (throws the exact same error as mentioned above) - Tried this on both Windows 10 Enterprise and Windows Server 2016 with Docker EE

ERROR

ADD failed: GetFileAttributesEx \\?\C:\WINDOWS\TEMP\docker-builder132308165\Web\WebUI: The system cannot find the path specified.

Docker file

FROM microsoft/iis:latest

RUN mkdir c:\\Web

RUN powershell -NoProfile -Command \
    Import-module IISAdministration; \
    New-IISSite -Name "iistestsite" -PhysicalPath "C:\\Web" -BindingInformation "*:8000:"

EXPOSE 8000

ADD C:\\Web\\WebUI\\ /Web

Output

Sending build context to Docker daemon  2.048kB
Step 1/5 : FROM microsoft/iis:latest
 ---> 168f41dd231f
Step 2/5 : RUN mkdir C:\Web
 ---> Running in 4ee30656253e
 ---> 12361acafea9
Removing intermediate container 4ee30656253e
Step 3/5 : RUN powershell -NoProfile -Command     Import-module IISAdministration;     New-IISSite -Name "iistestsite" -PhysicalPath "C:\\Web" -BindingInformation "*:8000:"
 ---> Running in 1187f395738d
 ---> c892ac1bb8d9
Removing intermediate container 1187f395738d
Step 4/5 : EXPOSE 8000
 ---> Running in bb62f91e7f45
 ---> 3a77124b4f79
Removing intermediate container bb62f91e7f45
Step 5/5 : ADD C:/Web/WebUI/ /Web
ADD failed: GetFileAttributesEx \\?\C:\WINDOWS\TEMP\docker-builder132308165\Web\WebUI: The system cannot find the path specified.

Docker info

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 22
Server Version: 17.06.2-ee-6
Storage Driver: windowsfilter
 Windows:
Logging Driver: json-file
Plugins:
 Volume: local
 Network: l2bridge l2tunnel nat null overlay transparent
 Log: awslogs etwlogs fluentd json-file logentries splunk syslog
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.1770.amd64fre.rs1_release.170917-1700)
Operating System: Windows Server 2016 Datacenter
OSType: windows
Architecture: x86_64
CPUs: 2
Total Memory: 7GiB
Name: dkwin2k16
ID: V2RF:5WKJ:F2P4:OW5S:I2OP:NOZR:L2B3:OFSL:2QCG:MBCX:LRYX:GYKG
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

MSI Packages are not getting installed (no negative docker feedback)

When installing MSI packages, i noticed that it builds successfully, but packages are not installed. There is no error message or other stuff coming up.

2 Methods that i use:

1. Method:

ADD HTTPLINKTOFILE/MSIFILE.msi /folder/MSIFILE.MSI
RUN msiexec.exe /i C:\folder\MSIFILE.MSI /passive & \
rd /s /q C:\Folder

2. Method:

ADD MSIFILE.msi "C:\Folder\"
RUN msiexec.exe C:\folder\MSIFILE.MSI /quiet /qn /passive

The http link method successfully installs the MSI file without returning any error.
But it does not show up, installed URL REWRITE or ARR or any other stuff but it's just not there.

The second method via adding the file to the Docker Volume and then installing it makes the DOCKER BUILD process hang, it just stays there without going any further, also no error message.

Sad i cant deliver a stack trace or error message but that's all i got. Anyone knows how to handle that?
This is not a duplicate to other MSI related issues since here, it get's installed in the first place but won't show functionality.

Unlocking config sections breaks IIS

In my Dockerfile, I need to unlock several config sections as follows:

RUN & c:\windows\system32\inetsrv\appcmd.exe unlock config /section:system.web/authentication

My app requires <authentication mode="Windows" />.

In my container, IIS works fine until I run this command in my image. Then I get this error using the PS command Get-EventLog application -newest 1 | format-list:

The worker process for application pool 'DefaultAppPool' encountered an error 'Configuration file is not well-formed XML trying to read configuration data from file '\?\C:\inetpub\temp\apppools\DefaultAppPool\DefaultAppPool.config', line number '3'. The data field contains the error code.

I also tried changing the runtime of the DefaultAppPool to 4.5, thinking that might help:

Set-ItemProperty -Path IIS:\AppPools\DefaultAppPool\ -Name managedRuntimeVersion -Value 'v4.5'

But that made no difference, even after restarting IIS inside the container.

Attemping iisreset produces these errors:

Index : 479
EntryType : Error
InstanceId : 3221232473
Message : The World Wide Web Publishing Service service depends on the Windows Process Activation Service
service which failed to start because of the following error:
%%50
Category : (0)
CategoryNumber : 0
ReplacementStrings : {World Wide Web Publishing Service, Windows Process Activation Service, %%50}
Source : Service Control Manager
TimeGenerated : 2/25/2017 11:41:06 PM
TimeWritten : 2/25/2017 11:41:06 PM
UserName :

Index : 478
EntryType : Error
InstanceId : 3221232495
Message : The Windows Process Activation Service service terminated with the following error:
%%50
Category : (0)
CategoryNumber : 0
ReplacementStrings : {Windows Process Activation Service, %%50}
Source : Service Control Manager
TimeGenerated : 2/25/2017 11:41:06 PM
TimeWritten : 2/25/2017 11:41:06 PM
UserName :

Please provide guidance on these images

  • Nano vs Core: which to use when
  • What Dockerfile-content is needed to support WCF (HTTP-activation, etc)
  • What volumes to mount to get access to IIS-logfiles, app-logfiles, etc.
  • How to run .NET Core sites/api's (Kestrel, etc)

... Or supply links to where this information is available on the web.

Add Expose directive

The IIS dockerfile does not have a expose directive to expose port 80. This makes the port inaccessible within the Virtual Network.

The directive needs to be added. This would also fix aspnet docker image as iis image is its extension.

microsoft/iis:nanoserver crashes when running ServiceMonitor

To reproduce:

Create and build a Dockerfile as in the example on the microsoft/iis docker hub page

# escape = `

FROM microsoft/iis:nanoserver

RUN mkdir C:\app

RUN powershell -NoProfile -Command `
    Import-module IISAdministration; `
    New-IISSite -Name "Site" -PhysicalPath C:\app -BindingInformation "*:8000:"

EXPOSE 8000

At this point you could also copy site contents into C:\app - it doesn't make a difference

When running the image via docker run the following is presented:

ERROR ( message:Cannot find requested collection element. )
Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"

 Service 'w3svc' has been stopped

APPCMD failed with error code 4312

ERROR: Failed to start or quesry status of service 'w3svc' error [80004005]

 Service 'w3svc' has been stopped

The container then exits as ServiceMonitor has crashed.

Install MSI error, how to install it?

I'm trying build my own image from this FROM microsoft/iis with this Dockerfile:

FROM microsoft/iis
SHELL ["powershell", "-command"]

# Install ASP.NET
RUN Install-WindowsFeature NET-Framework-45-ASPNET; `  
    Install-WindowsFeature Web-Asp-Net45

RUN mkdir C:\cry

COPY CRRuntime_64bit_13_0_5.msi C:\cry

RUN ["msiexec.exe", "/i", "C:\\cry\\CRRuntime_64bit_13_0_5.msi", "/qn"]
# Configure website
EXPOSE 80

But, when install the Crystal Report MSI, I get an error:
Step 9/13 : RUN msiexec.exe /i C:\cry\CRRuntime_64bit_13_0_5.msi /qn ---> Running in 7afd22e7a600The command 'msiexec.exe /i C:\cry\CRRuntime_64bit_13_0_5.msi /qn' returned a non-zero code: 1603

Whats is wrong ?
The MSI Crystal Reports file is: https://apurafacil.blob.core.windows.net/candidatos/CRRuntime_64bit_13_0_5.msi

Please redo ServiceMonitor.exe as a powershell script

I think Microsoft need to allow a way for applications to send message to ServiceMonitor.exe to be output to docker (like critical events which happen on machine etc). Right now it's a black box which does not do anything except for monitoring of status of w3svc.exe. This is already can and shall be accomplished by HEALTHCHECK directive, ServiceMonitor becomes redundant at this point. Instead it needs to have ability to output some messages sent to it to standard output so docker logs can see them. Like important events generated by application.

403 Error

I followed the instructions on this page with a File.. New Asp.Net 4.6.2 site but when I try to access the site (via the IP given using docker inspect and port 8000) I get 403 - Forbidden: Access is denied

I'm not sure if this is a copy of MicrosoftDocs/Virtualization-Documentation#181

but if not to repro follow the steps as outlined in the readme.md using a default 4.6.2 file new (MVC) project from Visual Studio

resetting iis process stops container

I've manually made permissions changes to several folders on my container after it's been started with docker-compose up. I now want to reset the iis process to allow these changes to take effect.

Actual Behaviour

Connecting to the container and running iisreset /stop produces the following error

[6f7312adf208...]: PS C:\Users\ContainerAdministrator\Documents> iisreset /stop
The background process reported an error with the following message: "The Hyper-V socket target process has ended.".
    + CategoryInfo          : ResourceUnavailable: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException

The container is then stopped and is unable to be restarted (possibly due to #42) with the following output

Service 'w3svc' started 
Service Change Status Notify Callback is called for service 'w3svc' with status '3'
Service 'w3svc' has been stopped 

Expected Behaviour

The iis process is successfully restarted after running iisreset /stop, keeping the container running and updated the permission changes.

Dockerfile:

FROM microsoft/iis

docker-compose.yml

version: '2.1'

services:
  myservice:
    image: myimage:dev
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "80"
    labels:
      - "com.microsoft.visualstudio.targetoperatingsystem=windows"
networks:
  default:
    external:
      name: nat

docker info:

PS D:\> docker info
Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 69
Server Version: 17.06.0-ce
Storage Driver: windowsfilter
 Windows:
Logging Driver: json-file
Plugins:
 Volume: local
 Network: l2bridge l2tunnel nat null overlay transparent
 Log: awslogs etwlogs fluentd json-file logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 15063 (15063.0.amd64fre.rs2_release.170317-
Operating System: Windows 10 Enterprise
OSType: windows
Architecture: x86_64
CPUs: 8
Total Memory: 15.92GiB
Name: xxxxxxxx
ID: 2WZX:3RRE:SJUD:SYOH:63CD:YOAA:3PWV:LX7D:SC7F:6L2I:BLBU:TVXL
Docker Root Dir: C:\ProgramData\Docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: -1
 Goroutines: 583
 System Time: 2017-07-12T16:11:54.7832226-07:00
 EventsListeners: 1
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

docker version:

PS D:\> docker version
Client:
 Version:      17.06.0-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:30:30 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.06.0-ce
 API version:  1.30 (minimum version 1.24)
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 22:19:00 2017
 OS/Arch:      windows/amd64
 Experimental: true

Question: How to get terminal into microsoft/iis container

've used the microsoft/iis image in a docker file that creates a site and copies files into the site's directory. Whenever I run the container I get a 404 file not found. I want to look into the container and see if something got messed up with the file copy. I use the command:

docker run -it -p 80:8000 microsoft/iis:2.0

to run the container. If I use the same command and put "cmd" or "powershell" at the end then it just ouputs:
[2J�[H�[37;40m
Service 'w3svc' started

And my session is hung. Is there something about this container that doesn't allow it to accept a command now? Any ideas for how I could manage this container?

HTTPS best practices?

What are the best practices for hosting an HTTPS website from within an IIS docker container?

Latest windowsservercore-10.0.14393.693 suspiciously large

I noticed for windowsservercore-10.0.14393.693 a 4+ GB layer is downloaded. This does not match with previous versions, which were in the hundreds of MB as far as I recall.

I lack the Docker expertise to diagnose but it feels like the Windows base layer was also re-downloaded for no reason. Possibly caused by moby/moby#30080 ?

What username/password can be used to access image remotely?

Hello,

I can see I can attach to runnning container with Enter-PsSession with "containeruser" account. That account does not seems to be having admin priviliges requried to create another admin account neither can be used for remote managment of server since password is not known.
How exactly you can work with container with UI based tools (Event Viewer, IIS Manager, Computer Manager etc)?

Restarting container fails

The container starts without a problem but stopping and starting it again produces the following:

PS D:\Dev\DockerTest> docker run -d microsoft/iis
4d18[...]
PS D:\Dev\DockerTest> docker stop 4d18
4d18
PS D:\Dev\DockerTest> docker start -a 4d18
ERROR ( message:New add object missing required attributes. Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'ALLUSERSPROFILE'
. )

APPCMD failed with error code 183

Failed to update IIS configuration

Is this scenario supported? Or should I always create a new container instead?

Images are out of date

microsoft/windowsservercore:10.0.14393.1198 was published several days ago, yet there are no matching iis images.

Pulling microsoft/iis fails

Hi
I Try to pull an iis image from Docker Hub like that:

docker pull microsoft/iis:windowsservercore-1709

but i always get the following error during extraction:

windowsservercore-1709: Pulling from microsoft/iis
5847a47b8593: Pull complete
0e0a3062a7ac: Pull complete
c1327dca1679: Extracting [==================================================>]  38.51MB/38.51MB
147658872cf6: Download complete
795a0b2a5f1c: Download complete
7602eb492585: Download complete
failed to register layer: re-exec error: exit status 1: output: time="2017-11-27T19:55:10Z" level=error msg="hcsshim::ImportLayer failed in Win32: The system cannot find the file specified. (0x2) layerId=\\\\?\\E:\\Docker\\windowsfilter\\c4c8205789340be83278279b71e41f62c8a790809be348fc020738d6310705e0 flavour=1 folder=C:\\Windows\\TEMP\\hcs150910787"
hcsshim::ImportLayer failed in Win32: The system cannot find the file specified. (0x2) layerId=\\?\E:\Docker\windowsfilter\c4c8205789340be83278279b71e41f62c8a790809be348fc020738d6310705e0 flavour=1 folder=C:\Windows\TEMP\hcs150910787

I am using the following versions from docker:

Client:
 Version:      17.09.0-ce
 API version:  1.30 (downgraded from 1.32)
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:40:09 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.06.2-ee-5
 API version:  1.30 (minimum version 1.24)
 Go version:   go1.8.3
 Git commit:   508bb92
 Built:        Thu Nov  2 00:54:07 2017
 OS/Arch:      windows/amd64
 Experimental: false

manifest for microsoft/iis:nanoserver not found

Hello,

If I try to pull the microsoft/iis:nanoserver image (docker pull microsoft/iis:nanoserver), I get the following error:
Error response from daemon: manifest for microsoft/iis:nanoserver not found

What am I doing wrong?

My environment:

  • Windows 10 Pro 14393.693
  • Docker 1.13.1 (10072)

Possible problems with ServiceMonitor

I'm using microsoft/aspnet:4.6.2 image. However question applies to all images which are using IIS.
I need to run powershell script on container startup. This one is made through specifying the ENTRYPOINT in Dockerfile: ENTRYPOINT [ "powershell", "./EntryPoint.ps1"]. At the end of ps1 file is added line to run the ServiceMonitor service: C:\ServiceMonitor.exe w3svc.
Does the override of entrypoint is a good idea? Can I execute script before/after starting the ServiceMonitor or there is some negative behavior?

Question: How to use environments in IIS websites / web apps?

One question that some of the Docker Captains are discussing at the moment is how to set some environment variables eg. from the ENV or from docker run -e VAR=val to be used in IIS web apps.

As IIS is running as a Windows service it does not catch up these environments. What about using such ServiceMonitor.exe as ENTRYPOINT (or CMD) and set these envs as system environments before starting the Windows Service (IIS must be set to manual before I think).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.