Coder Social home page Coder Social logo

aspnet-docker's Introduction

aspnet-docker [Obsolete]

The microsoft/aspnet-docker GitHub project has been archived. Ongoing development of Docker images for ASP.NET can be found in Microsoft/dotnet-framework-docker.

aspnet-docker's People

Contributors

cnotin avatar glennc avatar honggit avatar jinhuafei avatar jwalter avatar mbrown555 avatar mcy94w avatar michaelsimons avatar richlander 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  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

aspnet-docker's Issues

asp-net docker file missing script execute to enable dns.

Hi

Concerning this file : https://github.com/Microsoft/aspnet-docker/blob/master/4.6.2/Dockerfile
Problem : When using docker-compose with this image and a db sql developer image my website cannot resolve the db dns in my connectionstring.
Solution :
Added this at the end of the file :
RUN powershell set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord

Now the dns is being resolved correctly.
I hope this gets added and helps someone not spend hours of googeling ;-)

Permissions for default app pool account

Hi

When running an existing ASP.NET MVC app in this application I got the error;

CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root***************.dll' -- 'The directory name is invalid. '

It turns out the app pool account is missing some permissions for temp files. I've not pin pointed which files yet, but a work around is to add this PowerShell to the Dockerfile;

Add-LocalGroupMember -Group 'Administrators' -Member 'IIS AppPool\DefaultAppPool';

This is obviously not an ideal solution and it would be good to identify exactly which folders this account requires access to.

I'm running via the Visual Studio debugger and I got the image for the first time on Friday 16th June.

This issue could be very frustrating for anyone expecting this to work out of the box and it has affected at least one other person.

See this Stack Overflow question for further details;

https://stackoverflow.com/questions/44605735/starting-a-barebones-mvc-c-sharp-asp-net-project-in-docker-gives-compilation-er/44634199

Thanks

Jared

Changing pool name fails running the container

Docker file:

# escape=`
FROM microsoft/aspnet:4.6.2-windowsservercore-10.0.14393.1358

RUN powershell -NoProfile -ExecutionPolicy Bypass -Command `
    Import-Module IISAdministration; `
    $sm = Get-IISServerManager; `
    $sm.ApplicationPools['DefaultAppPool'].Name = 'web'; `
    $sm.CommitChanges()

Result (docker logs):

Error response from daemon: Container a987e3d3d2961b315183ef8d8cd59b1d6b21de455ed3236dd785e12d07d1f818 is not running: Exited (2147500037) Less than a second ago
ERROR ( message:Cannot find requested collection element. )

APPCMD failed with error code 4312

Failed to update IIS configuration

docker version

Client:
 Version:      17.03.1-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Tue Mar 28 00:40:02 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.03.1-ce
 API version:  1.27 (minimum version 1.24)
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Tue Mar 28 00:40:02 2017
 OS/Arch:      windows/amd64
 Experimental: true

Changing shell also affects derived images

Commit 6f15ac6 added the following to Dockerfiles:

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

This sets a non-default shell (the default being cmd.exe). This may be unexpected by derived images that expect the shell to be cmd.exe. Upgrading to the latest image broke some of our derived images due to this. It would be "nicer" if these base layers did not customize the shell, just to avoid surprises.

DLL Not found C:\Windows\Microsoft.Net\Framework64\v4.0.30319\WPF\wpfgfx_v0400.dll

When using my asp.net application inside of a docker container it says the specified module could not be found and errors out.
When I docker exec into the container and cd to the path above I do actually find the DLL.

image

I have no idea what the problem is or why it cant load a file that is actually there. Any help would be nice. Thanks in advance

Does not work out of the box. "The system cannot find the file specified"

Create a new asp.net mvc web application (no netcore)
Add a local filesytem publish profile
Add Docker Support
Publish or Build
Run docker build -t microsoft/iis

Get

Sending build context to Docker daemon  3.584kB
Step 1/4 : FROM microsoft/iis
 ---> b7db4e6fea84
Step 2/4 : ARG source
 ---> Running in 971e5af9f914
 ---> b83d50952dd2
Removing intermediate container 971e5af9f914
Step 3/4 : WORKDIR /inetpub/wwwroot
 ---> b8f3fd7618a9
Removing intermediate container 24c1b86fc566
Step 4/4 : COPY ${source:-obj/Docker/publish} .
COPY failed: GetFileAttributesEx \\?\C:\WINDOWS\TEMP\docker-builder845878484\obj\Docker\publish: The system cannot find the file specified.

The documentation appears to weave between netfx and netcore and I cant tell which is which or if it matters. I did try to change the COPY path to ./bin/Release/PublishedOutput but it still resolves to C:\WINDOWS\TEMP\docker-builder127245847\bin\Release\PublishedOutput

I cannot figure out what this wants, but following the tutorial (any of the MSFT ones) should net a working example and they do not. I'm just in a research stage with this, but am ready to exclude Docker entirely from potential cloud solutions with how long a simple example is taking between this and the cryptic Symantec issue.

Whats the COPY command want? Is docker support broken in VS 2017? Are the tutorials wrong?

Add support for installing msi packages that depend on oledlg.dll

After a long research and experimentation, while trying to install Crystal Reports Runtime for .NET, i have found out that the installation package depends on oledlg.dll.

As described here in more detail, this DLL file is not included on the Windows Server Core container :
[Windows 2016 container and Crystal Reports Runtime]
(https://social.msdn.microsoft.com/Forums/sqlserver/en-US/20588e86-c8fa-450a-8dad-77484eb9ef39/windows-2016-container-and-crystal-reports-runtime?forum=windowscontainers)

So in order to be able to install Crystal Reports, in any of the docker containers based on Windows Server Core, you need to manually extract oledlg.dll, from a full Windows Server machine, and copy it on your docker container.
After that, you should be able to install this specific package, and probably any other package that depends on that DLL.

Now, i would love to create a public repository, specific for users that need Crystal Reports support, but i i am not sure if i can upload a signed DLL from Microsoft in a public repository.

So, is there a way to overcome this issue, without the above 'hack', and without violating copyright?

My suggestion would be to include oledlg.dll in the Windows Server Core based containers, but i am sure that there is a reason for it not being already there.

Thanks in advance.

ERROR ( message:Cannot find requested collection element. )

ERROR ( message:Cannot find requested collection element. )
1、My dockerfile:

FROM microsoft/aspnet
ARG site_root=.
ADD ${site_root} /inetpub/wwwroot

2、build:
docker build -t ss_demo --build-arg site_root=/ .
3、Run:
docker run -d -p 8000:80 --name my-running-site ss_demo

But report this error:
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"

The library 'libhostpolicy.so' required to execute the application was not found

I'm not certain where to post this issue. I get the following error when running one of two docker containers using the ASP.NET Core 2.0 linux image:

A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/app'.

The container runs fine when being run using Visual Studio's Docker Support project. It only throws the above error when running on Docker for AWS which uses Moby linux for the host OS.

I get no further information than that unfortunately. I'm not sure how to debug it further either. Looking online, I've seen people mention that I need a runtimeconfig.template.json file which already I have.

There is an error while i pulling this image

failed to register layer: Error processing tar file(exit status 1): link /Files/Windows/System32/drivers/hvservice.sys /Files/Windows/WinSxSd64_microsoft-hyper-v-drivers-hypervisor_31bf3856ad364e35_10.0.14393.576_none_6a09e6b203871d0e/hvservice.sys: no such file or directory

I have retry on win10 and ubuntu, receive the same result. How to fix it?

Cannot start a previously stoped container

I have a Dockerfile based on FROM microsoft/mssql-server-windows-developer:2016-sp1 where I then add the asp.net features. It looks pretty much like this:

FROM microsoft/mssql-server-windows-developer:2016-sp1
ENV ACCEPT_EULA=Y sa_password=Passw0rd
 
RUN powershell -Command \
  $ErrorActionPreference = 'Stop'; \
  $ProgressPreference = 'SilentlyContinue'; \
  Add-WindowsFeature Web-Server; \
  Add-WindowsFeature NET-Framework-45-ASPNET; \
  Add-WindowsFeature Web-Asp-Net45; \
  Remove-Item -Recurse C:\inetpub\wwwroot\*;\
  Remove-Item -Recurse C:\dockerfile

ADD https://github.com/Microsoft/iis-docker/raw/master/windowsservercore/ServiceMonitor.exe /

EXPOSE 1433 80

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

The image gets created with no problem and when I run the image (to create a container) I run this command, attaching a local host directory as a volume where the IIS reads my site.
docker run -d -v C:\MyDir\web:C:\inetpub\wwwroot\ --name mycontainer myimage

Everything works fine, until I stop the container. I the want to start it again with this command docker start mycontainer but I get the following error:

ERROR ( message:New add object missing required attributes. Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'ACCEPT_EULA'. )
APPCMD failed with error code 183
Failed to update IIS configuration

Can anybody help me with that, what's going on? What is the start command trying to do messing up the web.config (?)
ACCEPT_EULA is one of the needed environment variables to run the SQL Server image.

Latest version fails to start website from VS

I downloaded the latest microsoft/aspnet and microsoft/windowsservercore and when I start and app from visualstudio which used to work without any issue it now fails with an access denied to some aspnet temp folder. I scramble to get this working and reverted back to using image microsoft/aspnet:4.6.2-windowsservercore-10.0.14393.1198 which where the version that worked. I'm not sure if it's a update to core 1358 or the installation of .net 4.7 or a combination of both. To repro it's really simple just do a file new aspnet project add docker support from vs then make sure that the microsoft/aspnet is the latest one and click run. It should fail. If you download 4.6.2-windowsservercore-10.0.14393.1198 and change the dockerfile to use that one it works fine.

Documentation still outdated for site_root arg

This issue was filed like 10 months ago: #11

The docs are still outdated. The main page has this under "how to use these images":
docker build -t aspnet-site --build-arg site_root=/ .

Would be an easy fix to save people some time from googling the error and being directed to the github issue i linked to above.

Documented 4.6.2 tags are out of date

The documented tags in the readme for 4.6.2 seem out of date.

4.6.2-windowsservercore-10.0.14393.321, 4.6.2-windowsservercore, 4.6.2, latest (4.6.2/Dockerfile)

The 4.6.2-windowsservercore-10.0.14393.321 tag is out of date. 4.6.2-windowsservercore-10.0.14393.1198 is the most recent fully versioned tag. It is also inconsistent that the windowsservercore tags are included for 4.6.2 but not for 3.5.

asp.net 3.5 run get 500 server error, how get the app detail infos?

@shhsu
i pull microsoft/aspnet:3.5 image , then build aspnetap image like below,

FROM microsoft/aspnet:3.5

RUN mkdir C:\aspnet35

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

EXPOSE 8000

ADD containerImageNet35/ /aspnet35

after image build and run.

i navigate asp.net page in browser, will get

500 - Internal server error.

There is a problem with the resource you are looking for, and it cannot be displayed.

may i get the app detail error messages?
thanks.

Docker Window Image not utilizing the ARGS correctly

HOST OS: Windows 10

Client:
Version: 17.09.0-ce
API version: 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.09.0-ce
API version: 1.32 (minimum version 1.24)
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:50:27 2017
OS/Arch: windows/amd64
Experimental: true

Dockerfile:
FROM microsoft/aspnet
ARG buildarea=production
RUN echo %buildarea%

Docker RUN
docker image build -t company/test --build-arg buildarea=staging .

The RUN echo simply re-echo's the %buildarea% and not the expected word "staging"

If I change the base image to microsoft/iis or microsoft/windowsservercore or microsoft/nanoserver
the --build-arg works correctly if supplied else it defaults to "production" as expected.

The failures I have picked up so far appear to be in:

  • microsoft/aspnet
  • microsoft/aspnet:4.6.2

data volume in microsoft/aspnet:3.5 error

sirs,
i use data volume in microsoft/aspnet ok, but not ok in microsoft/aspnet:3.5 .
will get 0xc037010a error.
The connection with the Virtual Machine hosting the container was closed. ( 0xc037010a)

aspnetand35compare

Bundling with Razor throws COMException

We are trying to dockerize our ASP.NET MVC5 app and got the following error at Line 9. We ran into the same issue before when dealing with bundling, but this time with docker we are not sure if it's a problem on the project side or caused by missing dependency in dockerfile. The dockerfile is straightforward and only uses FROM microsoft/aspnet as the base image.

The Web API part of our application is working well, but none of the page content would render past this first bundled css asset. The sources files are published using VS17 publish to file system with pre-compiling toggled on.

Exception from HRESULT: 0x800A1390
...

Line 7:      <title>@ViewBag.Title</title>
Line 8:      @RenderSection("styles", required: false)
Line 9:      @Styles.Render("~/Content/css") 
Line 10:     @Styles.Render("~/Content/cssstylesheets") 
Line 11:     @Styles.Render("~/Content/Select")
--
Source File: C:\inetpub\wwwroot\Views\Shared\_LoginLayout.cshtml    Line: 9 

Has anyone seen the same issue before? Thanks!

Replace application settings through environment variables

Hi,

I don´t know if this is the right place to post this issue. If not please sorry!

I have a application in .net core 2.0 and i´ve created a folder for application settings
/config/servicediscovery.json

Sample
{
"Service": {
"Enabled": true,
"Url": "http://localhost:8500",
"ServiceId": "service",
"ServiceName": "service",
"ServiceUrl": "http://localhost",
"ServicePort": "53489",
"HealthCheck": "http://localhost:53489/ping",
"HealthCheckInterval": 5
}
}

This file has the default settings to communicate with service discovery application and by default has the values to run in localhost.

After create the image i´m trying to run the application with docker

docker run --rm -it -p 5000:80 --name ServiceName Repository:Service:2.0.17298.133 --env ASPNETCORE_ENVIRONMENT=Production -e Service:HealthCheck="htttp://www.microsoft.com"

but this doesn´t apply the environment setting.

This is correct? There´s another way to do this?

One or more build-args [site_root] were not consumed, failing build

Using the sample Dockerfile, I am getting the following error during build:

PS C:\containers\ASP5> docker build -t aspnet-site --build-arg site_root=/ .
Sending build context to Docker daemon 7.946 MB
Step 1/2 : FROM microsoft/iis
---> 211fecef1e6b
Step 2/2 : RUN powershell -Command Add-WindowsFeature NET-Framework-45-ASPNET; powershell -Command Add-WindowsFeature Web-Asp-Net45; powershell -Command Remove-Item -Recurse C:\inetpub\wwwroot*
---> Running in 9d45db46a8a9

Success

Restart Needed Exit Code Feature Result


True No Success {ASP.NET 4.6}

Success Restart Needed Exit Code Feature Result


True No Success {Application Development, ASP.NET 4.6,...

---> 1530caa06fad
Removing intermediate container 9d45db46a8a9
One or more build-args [site_root] were not consumed, failing build.

Any idea what is causing this? Appreciate any feedback.

Thanks,

Ron

Images are out of date

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

Can't run `microsoft/aspnet` interactively

From @mrichman on November 1, 2017 20:52

Can't run microsoft/aspnet interactively using docker run -it microsoft/aspnet:latest cmd.exe

Service 'w3svc' has been stopped
ERROR ( message:Cannot find requested collection element. )

APPCMD failed with error code 4312
Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"

 Service 'w3svc' started

Output of docker info:

Containers: 3
 Running: 0
 Paused: 0
 Stopped: 3
Images: 8
Server Version: 17.09.0-ce
Storage Driver: windowsfilter
 Windows:
Logging Driver: json-file
Plugins:
 Volume: local
 Network: ics 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-1834)
Operating System: Windows 10 Enterprise
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 19.84GiB
Name: LPT1729
ID: XXWO:OECR:OYZV:QCO5:6SKW:QPGN:7ZPR:MMUA:B4JX:YRKD:6LWN:B4YY
Docker Root Dir: C:\ProgramData\Docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: -1
 Goroutines: 28
 System Time: 2017-11-01T16:51:24.8496393-04:00
 EventsListeners: 1
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Copied from original issue: aspnet/aspnet-docker#323

"The directory name is invalid" with the latest image

Using microsoft/aspnet:4.6.2-windowsservercore-10.0.14393.1358 image I've got this error when launching site that was previously running fine:

Compiler Error Message: CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\ab2094c7\6e6df95\App_global.asax.wz646n9b.dll' -- 'The directory name is invalid. '

I thinks it's permission issue

Can't start service - Lanmanserver on aspnet container

I've created an empty container FROM microsoft/aspnet. when I connect to it ('docker exec -it containerId powershell') and try to start the service Lanmanserver I get the following error.

(Note I've attached the dockerfile/start script [which just sleeps to keep the container running.)

PS C:> start-service lanmanserver
start-service : Failed to start service 'Server (lanmanserver)'.
At line:1 char:1

  • start-service lanmanserver
  •   + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommandException
      + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand
    
    
    
    

Blank Container.zip

Errors while starting ServiceMonitor manually

When I start ServiceMonitor inside a container for the first time, I see the following output:

PS C:> .\ServiceMonitor.exe w3svc

Service 'w3svc' has been stopped
ERROR ( message:Cannot find requested collection element. )

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

APPCMD failed with error code 4312
Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"

Service 'w3svc' started

Terminating it and starting ServiceMonitor again results in the following output:

PS C:> .\ServiceMonitor.exe w3svc

Service 'w3svc' has been stopped
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"

Service 'w3svc' started

These errors (in the first quote) happen only if starting ServiceMonitor manually. Without overriding the entry point, everything works as expected and the output looks like:

Service 'w3svc' has been stopped

Service 'w3svc' started

Since the default entry point and manually starting ServiceMonitor is the same command in this case, I'd expect the output to be the same - without any errors.

In order to reproduce these errors:

  1. Pull the latest image: docker pull microsoft/aspnet (I tried 4.6.2 and 4.7 - the result is the same).
  2. Enter the container by overriding the default entry point: docker run -it --rm --entrypoint powershell microsoft/aspnet.
  3. Inside the container, start ServiceMonitor: .\ServiceMonitor.exe w3svc.

The container host is Windows Server 2016 Standard (Version 1607, Build 14393.1593) and the Docker version is 17.03.2-ee-5, build fa09039.

It would be also interesting to know whether these errors can be safely ignored (until they're being fixed). It seems that everything else works as expected, but maybe I don't notice something.

SSL Support?

I'm trying to dockerize an SP Addin, but to have it working I think I need have it running under https, what can I do to enable it....

w3svc error

I am getting the following error when deploying a container to a Windows Server 2016 instance on AWS:

ERROR: Failed to stop or quesry status of service 'w3svc' error [800705b4]

This seems to be a similar issue to this one on the IIS dockerfile (the giveaway is "quesry"), but this image runs Service Monitor itself so I think it's relevant to both.

Interestingly, this only occurs when the server has been newly created and started up for the first time. Any attempt after the initial deployment has been successful.

This error has only appeared after changing our dockerfile from
FROM microsoft/aspnet:4.6.2-windowsservercore-10.0.14393.1358
to
FROM microsoft/aspnet:4.6.2-windowsservercore-10.0.14393.1480

Unable to read environment variables defined in Dockerfile in asp.net site

Not sure if this is a problem with docker, the base-image or this image.
Also see this stackoverflow question: http://stackoverflow.com/questions/39978342/docker-for-windows-asp-net-site-unable-to-read-environment-variables-defined-in

First create a container based on Dockerfile and default.aspx in
test.zip

Then start powershell in the container, and verify that powershell can see the externaly defined environment variables:

docker run -it --rm -e FROM_COMMAND_LINE="From command line" --entrypoint powershell test

As expected the environment variables are available:

PS C:\> $env:FROM_COMMAND_LINE
From command line
PS C:\> $env:FROM_DOCKERFILE
Value from dockerfile

However, when fetching the aspx file, the environment variables are NOT available: (The behavior is the same after iisreset inside the container)

PS C:\> $(wget http://localhost/default.aspx -UseBasicParsing).Content
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx GetEnvironmentVariables
COMPUTERNAME - 540CA54CDB93<br>
PUBLIC - C:\Users\Public<br>
LOCALAPPDATA - C:\Windows\system32\config\systemprofile\AppData\Local<br>
...
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx GetEnvironmentVariables - Process
COMPUTERNAME - 540CA54CDB93<br>
PUBLIC - C:\Users\Public<br>
LOCALAPPDATA - C:\Windows\system32\config\systemprofile\AppData\Local<br>
...
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx GetEnvironmentVariables - User
Path - C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;<br>
TEMP - C:\Windows\system32\config\systemprofile\AppData\Local\Temp<br>
TMP - C:\Windows\system32\config\systemprofile\AppData\Local\Temp<br>

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx GetEnvironmentVariables - Machine
PROCESSOR_REVISION - 3f02<br>
...

ASP.NET layers not flagged as "foreign"

Seeking clarification on this. I build an image based on microsoft/aspnet:3.5-windowsservercore-10.0.14393.1715, tag it and push to a private registry. The two Windows Server base layers are not pushed (they're foreign layers), but the next three layers from the ASP.NET image are pushed. These total 3.7GB:

aspnet-foreign-layers

In the ASP.NET image the 3.5 framework is added from a local CAB, so users can't reproduce those layers for themselves. Should they also be flagged as foreign layers so users aren't pushing them to their own registries?

Missing or bad fragments

I try to get microsoft/aspnet container but it fails on two fragments (9c7f9c7d9bc2 and d33fff6043a1). They retry for a while and fail with "unknown blob" message.

Using default tag: latest
latest: Pulling from microsoft/aspnet
9c7f9c7d9bc2: Retrying in 8 seconds
d33fff6043a1: Retrying in 9 seconds
b7c3bbe47489: Downloading [========>                                          ] 21.09 MB/123.8 MB
1028e286eae2: Waiting
28e6f26ee039: Waiting
a0db4e322336: Waiting

Docker Read-Only File System

I learned that you have the ability to set the file system to read-only in docker by setting a simple boolean flag. Any custom volumes you've specified remain unaffected. This seems like a great little flag to turn on for some added security, so I tried it out and got the following error from my ASP.NET Core 2.0 runtime image:

Failed to initialize CoreCLR, HRESULT: 0x80004005

Does the ASP.NET Core image support this feature and could it even be turned on in the Dockerfile by default for some added security?

Can docker image support .NET 2.0

Hi can you build the image that support the ASP.NET V2 because current we have support this version but i can find any image on NET 2.0

unable to pull microsoft/aspnet-docker

The image pulls, appears to finish, and then the 4GB part retries after appearing to finish, and just keeps doing that until the host closes connection.

image

I saw that someone else noticed this issue in a separate thread here: aspnet/aspnet-docker#228
Was just checking if anyone knew what was going on.

docker run prints 'Applied configuration changes to section "system.applicationHost/applicationPools" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"'

When performing docker run -i microsoft/aspnet the following line is printed ~50 times:

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

This appears to have no effect on functionality, but leaves undesirable spam in the logs of that container

docker version:

Client:
Version: 17.03.1-ee-3
API version: 1.27
Go version: go1.7.5
Git commit: 3fcee33
Built: Thu Mar 30 19:31:22 2017
OS/Arch: windows/amd64

Server:
Version: 17.03.1-ee-3
API version: 1.27 (minimum version 1.24)
Go version: go1.7.5
Git commit: 3fcee33
Built: Thu Mar 30 19:31:22 2017
OS/Arch: windows/amd64
Experimental: false

Windows Server Core 2016

port binding not working

From @paddyfay on December 9, 2016 9:44

I am trying to bind ports between my docker host and aspnet container. The container is created from the latest aspnet image. The following run command successfully starts the container however the aspnet site is only reachable from the private IP address of the container.

docker run -d -p 80:80 --name=test-site asp-site

The relating entry in docker hub states that reaching the container using localhost from the host is not supported in the current release. Does this mean that using the private IP address of the host is also not supported?

Copied from original issue: aspnet/aspnet-docker#179

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.