Build and Run Your First Docker Windows Server Container _ Docker Blog
Build and Run Your First Docker Windows Server Container _ Docker Blog
Learn more
container
Docker engine
docker for windows
windows 10
Windows Server
Windows Server Containers
Categories
MICHAEL FRIIS
Sep 26 2016
All
Products
Community
Today, Microsoft announced the general availability of Windows Server 2016, and with it, Docker engine
Engineering
running containers natively on Windows. This blog post describes how to get setup to run Docker Windows
Company
Containers on Windows 10 or using a Windows Server 2016 VM. Check out the companion blog posts on the
technical improvements that have made Docker containers on Windows possible and the post announcing
the Docker Inc. and Microsoft partnership.
Before getting started, It’s important to understand that Windows Containers run Windows executables
compiled for the Windows Server kernel and userland (either windowsservercore or nanoserver). To build and
run Windows containers, a Windows system with container support is required.
The simplest way to get a Windows Docker Engine is by installing the Docker for Windows public beta (direct
download link). Docker for Windows used to only setup a Linux-based Docker development environment
(slightly confusing, we know), but the public beta version now sets up both Linux and Windows Docker
development environments, and we’re working on improving Windows container support and Linux/Windows
container interoperability.
With the public beta installed, the Docker for Windows tray icon has an option to switch between Linux and
Windows container development. For details on this new feature, check out Stefan Scherers blog post.
For Microsoft Ignite 2016 conference attendees, USB flash drives with Windows Server 2016 preloaded are
available at the expo. Not at ignite? Download a free evaluation version and install it on bare metal or in a VM
running on Hyper-V, VirtualBox or similar. Running a VM with Windows Server 2016 is also a great way to do
Docker Windows container development on macOS and older Windows versions.
Once Windows Server 2016 is running, log in, run Windows Update to ensure you have all the latest updates
and install the Windows-native Docker Engine directly (that is, not using “Docker for Windows”). Run the
following in an Administrative PowerShell prompt:
Install‐PackageProvider ‐Name NuGet ‐MinimumVersion 2.8.5.201 ‐Force
Install‐Module ‐Name DockerMsftProvider ‐Force
Install‐Package ‐Name docker ‐ProviderName DockerMsftProvider ‐Force
Restart‐Computer ‐Force
Docker Engine is now running as a Windows service, listening on the default Docker named pipe. For
development VMs running (for example) in a Hyper-V VM on Windows 10, it might be advantageous to make
the Docker Engine running in the Windows Server 2016 VM available to the Windows 10 host:
# Configure Docker daemon to listen on both pipe and TCP (replaces docker ‐‐register‐service invocation above)
Stop‐Service docker
dockerd ‐‐unregister‐service
dockerd ‐H npipe:// ‐H 0.0.0.0:2375 ‐‐register‐service
Start‐Service docker
The Windows Server 2016 Docker engine can now be used from the VM host by setting DOCKER_HOST :
$env:DOCKER_HOST = "<ip‐address‐of‐vm>:2375"
Server:
Version: 1.12.2‐cs2‐ws‐beta
API version: 1.25
Go version: go1.7.1
Git commit: 62d9ff9
Built: Fri Sep 23 20:50:29 2016
OS/Arch: windows/amd64
Next, pull a base image that’s compatible with the evaluation build, re-tag it and to a test-run:
Docker images are typically built with docker build from a Dockerfile recipe, but for this example, we’re going
to just create an image on the fly in PowerShell.
Images stored on Docker Cloud available in the web interface and public images can be pulled by other
Docker users.
To develop with Docker Compose on a Windows Server 2016 system, install compose too (this is not required
on Windows 10 with Docker for Windows installed):
To try out Compose on Windows, clone a variant of the ASP.NET Core MVC MusicStore app, backed by a SQL
Server Express 2016 database. A correctly tagged microsoft/windowsservercore image is required before
starting.
To access the running app from the host running the containers (for example when running on Windows 10
or if opening browser on Windows Server 2016 system running Docker engine) use the container IP and port
5000. localhost will not work:
If using Windows Server 2016 and accessing from outside the VM or host, simply use the VM or host IP and
port 5000.
Summary
This post described how to get setup to build and run native Docker Windows containers on both Windows
10 and using the recently published Windows Server 2016 evaluation release. To see more example Windows
Dockerfiles, check out the Golang, MongoDB and Python Docker Library images.
Please share any Windows Dockerfiles or Docker Compose examples your build with @docker on Twitter
using the tag #windows. And don’t hesitate to reach on the Docker Forums if you have questions.
More Resources:
Sign up to be notified of GA and the Docker Datacenter for Windows Beta
Register for a webinar: Docker for Windows Server
Learn more about the Docker and Microsoft partnership
Docker engine, docker for windows, windows 10, Windows Server, Windows Server Containers
Feedback
76 thoughts on “Build and run your first Docker Windows Server container”
JGAITPro
September 26, 2016 at 2:19 pm
Hello, when starting the service displays the following error docker:
Start-Service : No pudo iniciarse el servicio 'Docker Engine (docker)'.
En línea: 1 Carácter: 1
+ Start-Service docker
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service],
ServiceCommandException
+ FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand
Thanks!
Reply
Michael Friis
September 28, 2016 at 7:15 pm
Reply
Kevin Jenkins
October 13, 2016 at 10:50 am
im having the same issue however it seems that the service did succeed
Reply
putri
April 27, 2017 at 6:11 am
I have the same problem, but when I try 'dockerd –register-service', the output says:
Reply
Ravi
September 27, 2016 at 2:47 am
Hello Michael, successfully build but getting error while compose. Requesting, Please do the need.
PS C:\Musicstore> docker-compose -f .\src\MusicStore\docker-compose.yml up
docker-compose : The term 'docker-compose' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ docker-compose -f .\src\MusicStore\docker-compose.yml up
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (docker-compose:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Reply
Michael Friis
September 28, 2016 at 7:16 pm
You have to dowload the compose executable, rename it to `docker-compose.exe` and place it
somewhere in your path (for example in `$env:ProgramFiles\docker` with `docker.exe` and
`dockerd.exe`.)
Reply
Robert Colbert
September 27, 2016 at 7:03 am
I'll be filing a bug on GitHub but wanted to share this. If you normally compress your system drive, the
following folders must be uncompressed for Hyper-V containers to run:
C:\ProgramData\Microsoft\Windows\Hyper-V\Container Images Store
C:\ProgramData\Microsoft\Windows\Hyper-V\Conttainer Utility VM
C:\ProgramData\Docker\windowsfilter
If they are compressed, Docker will fail to launch the container.
Reply
Michael Friis
September 28, 2016 at 7:17 pm
Reply
Jay
September 27, 2016 at 8:05 pm
I installed the beta but there is no menu to switch to Windows container. I'm on Windows 10 Anniversary
Update. What could be the problem?
Reply
Michael Friis
September 28, 2016 at 7:17 pm
That sounds very strange, please open an issue here with version information:
https://github.com/docker/for-win/issues
Reply
Sasi
September 29, 2016 at 9:13 pm
Getting the below error while running docker-compose up. Any idea please? (i am using Windows Server
2016 TP5 BTW)
PS C:\> docker-compose up -d
Recreating default_web_1
ERROR: for web Windows does not support disconnecting a running container from a network
ERROR: Encountered errors while bringing up the project.
Reply
Michael Friis
October 18, 2016 at 7:06 am
You have to use the default network and a recent version of Docker Compose:
networks:
default:
external:
name: nat
https://github.com/friism/MusicStore/blob/master/docker-compose.windows.yml
Reply
George
September 30, 2016 at 8:24 am
We have pretty good Linux docker in docker build pipeline for our NodeJS micro services services. We're
looking to build a UWP app and wondering if there's a similar pattern we can implement. We made some
initial attempts using nano and core but there seemed to be missing pieces to get a UWP build working.
Reply
Johnny
October 10, 2016 at 2:02 pm
Reply
Michael Friis
October 18, 2016 at 7:07 am
To get the switch, you have to install Docker for Windows: https://docs.docker.com/docker-for-
windows/
Reply
Cormac
October 19, 2016 at 9:59 am
I successfully installed docker for windows beta on latest windows 10 anniversary (10.0.14393) , and ran
successfully the hello world app (in linux container mode) through powershell. Then i changed to
windows container mode. I could not successfully pull any windows images. Some of the images dont
mention windows 10 anniv . Does this mean they will not run on in it? Or could i be missing some other
packages?
docker pull microsoft/windowsservercore – failed with Docker : local error: tls: record overflow
docker pull microsoft/mssql-server – kept freezing with the message: Please login prior to pull:
docker pull microsoft/aspnet – components appear to fail to download with a 'Retrying in xx seconds '
message.
A second effort got a lot further, but hung at 'download complete' for one of the components.
Do we know if these containers will run on win 10 anniv, and is there an alternative method to manually
download the containers?
Reply
Cormac
October 19, 2016 at 10:07 am
Addendum to the above!: THe second pull attempt for microsoft/aspnet did seem to complete
successfully:
PS C:\Windows\system32>
Reply
Erik
October 25, 2016 at 11:36 am
I'm not sure what's going on here, but when I reach the Install-Package step to install docker, I get the
message:
Any ideas?
Reply
Michael Friis
October 29, 2016 at 10:32 am
That sounds like an error with the package installer. Please open an issue here:
https://github.com/OneGet/MicrosoftDockerProvider
Reply
John Waters
October 27, 2016 at 10:48 am
Michael Friis
October 29, 2016 at 10:34 am
Strange, that looks like a generic NuGet error – maybe you had an intermittent internet connection
problem or similar. Could you try building again?
Reply
Andy
February 17, 2017 at 4:46 pm
Reply
VSankar
April 28, 2017 at 4:30 pm
I'm also getting the same error.. I checked my internet and its working fine…I tried several
time and I also try by modifying NuGet.config with
Reply
XA
October 31, 2016 at 4:08 pm
Hello Michael,
docker-compose.yml now supports on windows also ? i have one docker-compose.yml file which was
built for linux system base image. can i run the same on windows ?
moreover i have all the DockerFiles built for linux systems now we need to make it for windows and
facing really difficult time here. any tool which can help for that ?
Reply
bora
November 4, 2016 at 1:46 am
Hi,
I am trying to run the app with docker in Visual Studio 2015(with Docker Tools installed), but get the
following error?
Reply
Collin
January 17, 2017 at 11:27 am
bora, Did you ever solve this? I've had problem after problem on Windows 8, which isn't supported
by Docker for Windows!. It was clunky with RC2 but it all worked at least.
I can only run a docker container with virtualbox if I use the –net=host flag. I wonder if this is
related to the this error.
Reply
Sergey
November 10, 2016 at 2:29 pm
Reply
Paul
November 18, 2016 at 5:54 am
Hi Michael,
docker-compose -f .\docker-compose.windows.yml up
But got the following error when it tried to reset the sa login
Reply
Ken Rider
November 23, 2016 at 12:52 pm
Reply
eilz
February 26, 2017 at 8:11 am
I get these errors also, is there any update, did anyone get around them?
Reply
Michael Friis
February 27, 2017 at 5:55 pm
I've pushed a bunch of updates to the MusicStore app recently to add healthchecks and make
startup more reliable: https://github.com/friism/MusicStore
Reply
Mike
November 25, 2016 at 2:01 am
I suspect it is the proxy blocking but cannot access it to check. Is it possible to do this behind a very
strict proxy? An alternative download location or manual install?
Reply
Theeba Krishnan
July 18, 2017 at 5:49 am
Reply
robertolabarca
November 25, 2016 at 5:34 am
PLS:
Reply
Ofer
November 26, 2016 at 3:12 pm
When running "docker pull microsoft/windowsservercore" , where are the files going to?
Reply
Michael Friis
February 27, 2017 at 5:56 pm
They go to C:\programdata\docker
You can see images on your machine with `docker images`
Reply
Brad Jensen
November 29, 2016 at 2:37 pm
So does this mean I can make a windows server 2016 container with windows deduplication in it, and
then run that container on windows 10?
Reply
Zonciu Liang
December 1, 2016 at 11:47 am
Hello, I'm wondering how to add registry mirror on windows server 2016?
Reply
Pedro Alvarez
December 15, 2016 at 6:18 am
Reply
Jeremy
December 20, 2016 at 2:57 pm
I'd love to see a demo of deploying to a remote windows 2016 server. Also, if a database were part of a
container package (e.g. service a = webapi + database), how would you handle the distribution/sharing
of the data file?
Reply
Michael Friis
February 27, 2017 at 6:02 pm
There are several good ways to secure and connect to remote Windows Docker hosts. Personally, I
run sshd on Windows and tunnel the Docker connection over SSH. Details here:
https://github.com/friism/ec2-windows-packer-ssh
Reply
Ramu
January 8, 2017 at 10:25 pm
Hi,
When I run "docker-compose -f .\docker-compose.windows.yml build" I get a whole heap of errors and
exists,
ERROR: Service 'web' failed to build: The command 'powershell -Command $ErrorActionPreference =
'Stop'; dotnet build .\samples\MusicStore.Standalone' returned a non-zero
code: 1
..
..
..
ERROR: Service 'web' failed to build: The command 'powershell -Command $ErrorActionPreference =
'Stop'; dotnet build .\samples\MusicStore.Standalone' returned a non-zero
code: 1
Any ideas?
Reply
Michael Friis
February 27, 2017 at 6:02 pm
Reply
osv
January 10, 2017 at 9:57 pm
docker for windows can't be installed on Windows 2016 it is just possible on Windows 10.
Is there a way of running windows and linux based containers on Windows 2016?
Reply
Estanislao
January 24, 2017 at 6:10 am
Containers share host OS. In windows 2016 you will be able to run windows 2016 based containers.
Or you can start a linux VM and run your container on it.
Reply
Estanislao
January 24, 2017 at 6:19 am
As i understand, containers share host OS. In windows 2016 you will be able to run windows 2016
based containers. Or you can start a linux VM and run your container on it.
Reply
jfoliveira
January 16, 2017 at 3:10 am
Hi Michael,
Could you update your tutorial to use another sample project other than the `MusicStore`. The
MusicStore project is broken as already mentioned here – https://github.com/docker/labs/issues/144 –
therefore it gets hard for beginners in Docker for Windows to actually follow your step by step.
Your article was published with good intention but unfortunately, at the time of this writing on 16-Jan-
2017, it's not being a fully working tutorial.
Thanks!
Reply
Michael Friis
February 27, 2017 at 6:04 pm
Reply
sagar
February 27, 2017 at 6:24 pm
Hello sir ,
When i run .exe application on windows container at that time i am getting below errors .
Docker\Resources\bin\docker.exe: Error response from daemon: container
7da4b32f71a7a0746aa472ae7c20f677ca1153cb75e05b6140a4fd8a758f120f encountered an error during
CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) extra
info: {"ApplicationName":"","CommandLine":"name.exe/bin / bin/name.exe input1
output","User":"","WorkingDirectory":"C:\\","Environment":{},"EmulateConsole":false,"CreateStdInPipe
":true,"CreateStdOutPipe":true,"CreateStdErrPipe"
Reply
sagar
February 27, 2017 at 6:25 pm
Reply
Tim
March 6, 2017 at 1:40 am
Hi,
well written and interesting.
I´m curious if this would work with an ESXi Server running vSphere 6.5 (Integrated Container) as well.
As far as I know the vSphere Container get deployed with a Linux Kernel as base preventing clean
Installations of Windows in these.
Reply
Neil Devadasan
March 7, 2017 at 8:32 am
Thank you for the post. I am learning a lot by practicing these instructions.
version: '2.1'
services:
db:
image: microsoft/mssql-server-windows-developer
environment:
sa_password: "Password1"
ACCEPT_EULA: "Y"
ports:
– "1433:1433" # REMARK: This is currently required, needs investigation
healthcheck:
test: [ "CMD", "sqlcmd", "-U", "sa", "-P", "Password1", "-Q", "select 1" ]
interval: 1s
retries: 20
web:
build:
context: .
dockerfile: Dockerfile.windows
environment:
– "Data:DefaultConnection:ConnectionString=Server=db,1433;Database=MusicStore;User
Id=sa;Password=Password1;MultipleActiveResultSets=True"
depends_on:
db:
condition: service_healthy
ports:
– "5000:5000"
networks:
default:
external:
name: nat
Any insight?
Thanks
Reply
Michael Friis
March 8, 2017 at 1:22 pm
What version of Docker Compose do you have? Please make sure you have a recent one. The
sample works for me with docker-compose version 1.11.2.
Reply
Lea Abrugena
April 11, 2017 at 1:47 am
Hi Michael,
Dockerfile
From microsoft/windowsservercore
CMD ["echo", "Hello World"]
Result:
PS C:\FSD\Docker\Trial1> docker build -t lea/leatest .
Sending build context to Docker daemon 2.048kB
Step 1/2 : FROM microsoft/windowsservercore
latest: Pulling from microsoft/windowsservercore
3889bb8d808b: Pulling fs layer
503d87f3196a: Downloading
image operating system "windows" cannot be used on this platform
Reply
Michael Friis
May 15, 2017 at 7:32 am
You have to switch to Docker Windows Container mode. Use the whale icon in the sys-tray.
Reply
Michael Curran
April 24, 2017 at 1:46 pm
Running into this issue, and yes I am in a 64-bit PS shell , the Install-Module works fine — the Install-
Package does not (turned off FW just in case it was in the way).
Reply
Michael Friis
May 15, 2017 at 7:37 am
Daniel Weicht
April 27, 2017 at 5:27 am
I have installed Docker in Windows Server 2016 and I am having the following issue.
The daemon.json file has not been installed and I want to change the path directory from C to D. My
question is, can I simply create a daemon.sjon file under the following path "C:\Program Files\Docker"
and then save the file? Additionally, will the following be enough to Point the D drive
{
"graph": "D:\\docker"
}
Best regards,
Daniel
Reply
Michael Friis
May 15, 2017 at 7:46 am
Reply
Daniel Weicht
June 7, 2017 at 1:30 am
Hi Michael,
Thank you very much for your response. It worked like a charm :).
Regards,
Daniel
Reply
Reply
Phill
May 10, 2017 at 4:20 am
Hi Michael,
C:\MusicStore>docker-compose -f .\docker-compose.windows.yml up
Starting musicstore_db_1
Starting musicstore_web_1
Attaching to musicstore_db_1, musicstore_web_1
db_1 | VERBOSE: Starting SQL Server
db_1 | VERBOSE: Changing SA login credentials
db_1 | VERBOSE: Started SQL Server.
web_1 | C:\Users\ContainerAdministrator\.nuget\packages\internal.aspnetcore.sdk\1.0.1-rc2-
15218\build\Git.targets(15,5): warning : Unable to determine active git branch.
[C:\MusicStore\samples\MusicStore\MusicStore.csproj]
web_1 | C:\Users\ContainerAdministrator\.nuget\packages\internal.aspnetcore.sdk\1.0.1-rc2-
15218\build\Git.targets(32,5): warning : Property 'CommitHash' was not set
[C:\MusicStore\samples\MusicStore\MusicStore.csproj]
web_1 | warn: Microsoft.EntityFrameworkCore.Infrastructure.IModelValidator[1]
web_1 | No type was specified for the decimal column 'Price' on entity type 'Album'. This will cause
values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the
SQL server column type that can accomadate all the values using 'ForSqlServerHasColumnType()'. To
configure this warning use the DbContextOptionsBuilder.ConfigureWarnings API (event id
'SqlServerEventId.DefaultDecimalTypeWarning'). ConfigureWarnings can be used when overriding the
DbContext.OnConfiguring method or using AddDbContext on the application service provider.
web_1 | warn: Microsoft.EntityFrameworkCore.Infrastructure.IModelValidator[1]
web_1 | No type was specified for the decimal column 'Total' on entity type 'Order'. This will cause values
to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL
server column type that can accomadate all the values using 'ForSqlServerHasColumnType()'. To
configure this warning use the DbContextOptionsBuilder.ConfigureWarnings API (event id
'SqlServerEventId.DefaultDecimalTypeWarning'). ConfigureWarnings can be used when overriding the
DbContext.OnConfiguring method or using AddDbContext on the application service provider.
web_1 | warn: Microsoft.EntityFrameworkCore.Infrastructure.IModelValidator[1]
web_1 | No type was specified for the decimal column 'UnitPrice' on entity type 'OrderDetail'. This will
cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly
specify the SQL server column type that can accomadate all the values using
'ForSqlServerHasColumnType()'. To configure this warning use the
DbContextOptionsBuilder.ConfigureWarnings API (event id
'SqlServerEventId.DefaultDecimalTypeWarning'). ConfigureWarnings can be used when overriding the
DbContext.OnConfiguring method or using AddDbContext on the application service provider.
web_1 | Hosting environment: Production
web_1 | Content root path: C:\MusicStore\samples\MusicStore
web_1 | Now listening on: http://0.0.0.0:5000
web_1 | Application started. Press Ctrl+C to shut down.
db_1 |
db_1 | TimeGenerated EntryType Message
db_1 | ————- ——— ——-
db_1 | 5/10/2017 11:50:18 AM Information None
db_1 | 5/10/2017 11:50:40 AM Information Using 'xplog70.dll' version '2015.130.1601…
db_1 | 5/10/2017 11:50:40 AM Information Attempting to load library 'xplog70.dll' i…
web_1 | fail: Microsoft.AspNetCore.Server.Kestrel[0]
web_1 | UbReadCb
web_1 | System.MissingMethodException: Method not found:
'System.IO.Pipelines.ReadableBufferAwaitable System.IO.Pipelines.IPipeReader.ReadAsync()'.
web_1 | at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.SocketOutput.<StartWrites>d__27.MoveNext()
web_1 | at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine]
(TStateMachine& stateMachine)
web_1 | at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.SocketOutput.StartWrites()
web_1 | at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.SocketOutput..ctor(IPipe pipe, KestrelThread
thread, UvStreamHandle socket, Connection connection, String connectionId, IKestrelTrace log)
web_1 | at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Connection..ctor(ListenerContext context,
UvStreamHandle socket)
web_1 | at
Microsoft.AspNetCore.Server.Kestrel.Internal.Http.ListenerSecondary.ReadStartCallback(UvStreamHandl
e handle, Int32 status)
web_1 | at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvStreamHandle.UvReadCb(IntPtr
handle, Int32 status, uv_buf_t& buf)
web_1 |
web_1 | Unhandled Exception: System.AggregateException: An error occurred while writing to logger(s).
(The collection has been marked as complete with regards to additions.) —>
System.InvalidOperationException: The collection has been marked as complete with regards to
additions.
web_1 | at System.Collections.Concurrent.BlockingCollection`1.TryAddWithNoTimeValidation(T item, Int32
millisecondsTimeout, CancellationToken cancellationToken)
web_1 | at
Microsoft.Extensions.Logging.Console.Internal.ConsoleLoggerProcessor.EnqueueMessage(LogMessage
Entry message)
web_1 | at Microsoft.Extensions.Logging.Console.ConsoleLogger.WriteMessage(LogLevel logLevel, String
logName, Int32 eventId, String message, Exception exception)
web_1 | at Microsoft.Extensions.Logging.Console.ConsoleLogger.Log[TState](LogLevel logLevel, EventId
eventId, TState state, Exception exception, Func`3 formatter)
web_1 | at Microsoft.Extensions.Logging.Logger.Log[TState](LogLevel logLevel, EventId eventId, TState
state, Exception exception, Func`3 formatter)
web_1 | — End of inner exception stack trace —
web_1 | at Microsoft.Extensions.Logging.Logger.Log[TState](LogLevel logLevel, EventId eventId, TState
state, Exception exception, Func`3 formatter)
web_1 | at Microsoft.AspNetCore.Server.Kestrel.Internal.KestrelTrace.Log[TState](LogLevel logLevel,
EventId eventId, TState state, Exception exception, Func`3 formatter)
web_1 | at Microsoft.Extensions.Logging.LoggerExtensions.LogCritical(ILogger logger, String message,
Object[] args)
web_1 | at Microsoft.AspNetCore.Server.Kestrel.Internal.KestrelEngine.Dispose()
web_1 | at Microsoft.AspNetCore.Server.Kestrel.KestrelServer.Dispose()
web_1 | at Microsoft.Extensions.DependencyInjection.ServiceProvider.Dispose()
web_1 | at Microsoft.AspNetCore.Hosting.Internal.WebHost.Dispose()
web_1 | at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host, CancellationToken
token, String shutdownMessage)
web_1 | at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host)
web_1 | at MusicStore.Program.Main(String[] args) in C:\MusicStore\samples\MusicStore\Program.cs:line
52
musicstore_web_1 exited with code 1
Reply
Phill
May 10, 2017 at 4:29 am
Hi Michael,
This might be my bad, i used your commands in command not powershell, will update when
complete.
Reply
Michael Friis
May 15, 2017 at 7:51 am
Cool, let me know how it goes – if you can't get this working, we're also maintaining an up-to-
date sample here: https://github.com/dockersamples/dotnet-musicstore
Reply
JCampbell
May 20, 2017 at 9:15 am
Hi,
I'm trying to build the Musicstore application in Powershell and I'm getting the following:
When I check Windows Explorer (with hidden files showing) the _MEI18~1 folder doesn't exist.
Note that I'd had a github error on the previous step (git clone https://github.com/friism/Musicstore)
though I read this wasn't a true error – just github writing to stderr when it should've written to stdout
(https://github.com/dahlbyk/posh-git/issues/109). And the MusicStore folder seemed to be created ok.
Thanks,
John
PS I'm happy to post elsewhere if this is a docker issue and not a tutorial issue.
Reply
Rene
June 19, 2017 at 7:31 am
Hi John, in case you could not resolve this meanwhile or for anyone else having this problem:
Looks like a faulty and/or outdated docker-compose executable to me. I had the same error
following the installation instructions from training.docker.com where it referenced a docker-
compose executable from bintray.com (docker-compose version 1.9.0dev, build 466ebb6).
The docker docs referenced https://github.com/docker/compose/releases so I tried with a current
docker-compose (docker-compose version 1.13.0, build 1719ceb8) and got it working just fine.
Reply
Aslam
May 22, 2017 at 3:45 am
I am trying to start a container on Win 2016 machine and getting below error –
Reply
saurabh jain
June 6, 2017 at 9:52 pm
Hello i have a container id that runs my app on my local pc after getting docke ip for using this
command :-
docker inspect –format="{{.NetworkSettings.Networks.nat.IPAddress}}" helloimagesdockcont
when i tried to run this ip another pc it not executed means i need to expose my containe ip with my
local network what i need to do my pc havinh windows 10 configuration with docker latest version
i have tried satic ip rule as well as open firewall using netsh command but still the problem noit resolved
please help!!!
Reply
Theeba Krishnan
July 18, 2017 at 5:50 am
"fatal: Error starting daemon: Error initializing network controller: Error creating default network: HNS
failed with error : The object already exists."
Reply
Frank
August 3, 2017 at 1:12 am
I tried to setup the development environment in windows server 2016 with Visual Studio 2017, I got the
same error, any solution for this? I know MS recommends development should be on Windows 10 while
testing/prod environment should be on Windows server 2016, but I only have windows server 2016, no
windows 10.
Reply
Alagesan Pandy
August 3, 2017 at 7:09 am
Below is the error I get during the docker-compose build at the step dotnet publish –
Models\MusicStoreContext.cs(6,36): error CS0246: The type or namespace name 'IdentityUser' could not
be found (are you missing a using directive or an assembly reference?)
[C:\app\samples\MusicStore\MusicStore.csproj]
Models\MusicStoreContext.cs(8,18): error CS0311: The type 'MusicStore.Models.ApplicationUser' cannot
be used as type parameter 'TUser' in the generic type or method 'IdentityDbContext<TUser>'. There is no
implicit reference conversion from 'MusicStore.Models.ApplicationUser' to
'Microsoft.AspNetCore.Identity.IdentityUser'. [C:\app\samples\MusicStore\MusicStore.csproj]
ForTesting\Mocks\Facebook\TestFacebookEvents.cs(50,62): error CS0246: The type or namespace
name 'OAuthRedirectToAuthorizationContext' could not be found (are you missing a using directive or
an assembly reference?) [C:\app\samples\MusicStore\MusicStore.csproj]
ForTesting\Mocks\Google\TestGoogleEvents.cs(50,62): error CS0246: The type or namespace name
'OAuthRedirectToAuthorizationContext' could not be found (are you missing a using directive or an
assembly reference?) [C:\app\samples\MusicStore\MusicStore.csproj]
ForTesting\Mocks\MicrosoftAccount\TestMicrosoftAccountEvents.cs(51,62): error CS0246: The type or
namespace name 'OAuthRedirectToAuthorizationContext' could not be found (are you missing a using
directive or an assembly reference?) [C:\app\samples\MusicStore\MusicStore.csproj]
ForTesting\Mocks\Twitter\TestTwitterEvents.cs(44,62): error CS0246: The type or namespace name
'TwitterRedirectToAuthorizationEndpointContext' could not be found (are you missing a using directive
or an assembly reference?) [C:\app\samples\MusicStore\MusicStore.csproj]
ERROR: Service 'web' failed to build: The command 'powershell -Command $ErrorActionPreference =
'Stop'; $ProgressPreference = 'SilentlyContinue'; dotnet publish –output /out –configuration Release –
framework netcoreapp2.0 –runtime win10-x64 .\samples\MusicStore' returned a non-zero code: 1
Reply
Roger Champagne
September 18, 2017 at 8:43 am
Alagesan, I am getting the same error – Step 12/18. Running on Windows Server 2016 Standard
(inside a VMWare VM, don't know if this is relevant), Windows updated as of this morning. Using
Docker Enterprise Edition Basic installed via Powershell.
Reply
Roger Champagne
September 18, 2017 at 1:46 pm
Was using docker-compose version 1.16.0, and have been told that there are issues with recent
versions of this tool. I rolled back to 1.11.2 to no avail.
There seems to be a missing using directive in MusicStore.Models. Visual Studio suggests adding
"using Microsoft.AspNetCore.Identity;", but when I fix it, then there are other compilation errors in
the mocks in the "ForTesting" subfolders.
Reply
fosu
November 1, 2017 at 1:43 am
Hi Michael
when doing the docker-compose cmd at 12/18,there is a error,how could I fix it?
—> c952057551cf
Step 11/18 : ADD samples samples
—> 1e662eb0a9c0
Step 12/18 : RUN dotnet publish –output /out –configuration Release –framework netcoreapp2.0 –
runtime win10-x64 .\samples\MusicStore
—> Running in 72bb57b92619
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Models\MusicStoreContext.cs(6,36): error CS0246: The type or namespace name 'IdentityUser' could not
be found (are you missing a using directive or an assembly reference?)
[C:\app\samples\MusicStore\MusicStore.csproj]
Models\MusicStoreContext.cs(8,18): error CS0311: The type 'MusicStore.Models.ApplicationUser' cannot
be used as type parameter 'TUser' in the generic type or method 'IdentityDbContext<TUser>'. There is no
implicit reference conversion from 'MusicStore.Models.ApplicationUser' to
'Microsoft.AspNetCore.Identity.IdentityUser'. [C:\app\samples\MusicStore\MusicStore.csproj]
ForTesting\Mocks\Facebook\TestFacebookEvents.cs(50,62): error CS0246: The type or namespace
name 'OAuthRedirectToAuthorizationContext' could not be found (are you missing a using directive or
an assembly reference?) [C:\app\samples\MusicStore\MusicStore.csproj]
ForTesting\Mocks\Google\TestGoogleEvents.cs(50,62): error CS0246: The type or namespace name
'OAuthRedirectToAuthorizationContext' could not be found (are you missing a using directive or an
assembly reference?) [C:\app\samples\MusicStore\MusicStore.csproj]
ForTesting\Mocks\MicrosoftAccount\TestMicrosoftAccountEvents.cs(51,62): error CS0246: The type or
namespace name 'OAuthRedirectToAuthorizationContext' could not be found (are you missing a using
directive or an assembly reference?) [C:\app\samples\MusicStore\MusicStore.csproj]
ForTesting\Mocks\Twitter\TestTwitterEvents.cs(44,62): error CS0246: The type or namespace name
'TwitterRedirectToAuthorizationEndpointContext' could not be found (are you missing a using directive
or an assembly reference?) [C:\app\samples\MusicStore\MusicStore.csproj]
ERROR: Service 'web' failed to build: The command 'powershell -Command $ErrorActionPreference =
'Stop'; $ProgressPreference = 'SilentlyContinue'; dotnet publish –output /out –configuration Release –
framework netcoreapp2.0 –runtime win10-x64 .\samples\MusicStore' returned a non-zero code: 1
Reply
Prem
December 12, 2017 at 9:06 pm
Hi Team –
Can we install Docker or Docker Toolbox in windows with Windows Kernel. Because my requirement is to
install Windows 2012 using docker and install our application and make sure all services are working
when Docker Container is running.
2. Installed Docker ToolBox in Windows 2010/2012 but Server is showing as OS/Arch: linux/amd64. So i
was not able to install any Windows related OS.
Can we have any other options to install Docker Toolbox with OS/Arch showing as Windows so that we
can install Windows operation system on top of it ?
Thank you
Prem
Reply
Sampath
January 2, 2018 at 9:44 pm
Can anyone help me, how to pull postgreSQL image from docker…. I am getting lot of linux based
images of postgreSQL.. I want postgreSQL image for windows server platform…
Reply
Leave a Reply
Your name (required)
Your name
Your comment
Your comment
Post comment
Related Posts
Welcome Canonical to Docker Docker Compose for Amazon ECS Apple Silicon M1 Chips and
Hub and the Docker Verified Now Available Docker
Publisher Program By Ben De St Paer-Gotch November 19 By Ben De St Paer-Gotch November 16
By Matt Carter November 24 2020 2020 2020
Pricing
FAQ
© 2020 Docker Inc. All rights reserved | Terms of Service | Privacy | Legal