Little gotcha in Docker for Windows


I am writing a small ASP.NET Core Web Application and decided to add Docker support. However, even though this was a vanilla application built from the Visual Studio project template, I kept getting the following error trying to run this:

"Can not find the container with the name starting with dockercompose1234567890"

Docker appeared healthy and my other containers were running fine, but for some reason it wasn't able to fire up the container it created dynamically to run my app. So I went out to PowerShell and tried a "docker ps -al" and realized the container did not exist.

I ran through the setup guide here and looked at the requirement to share a drive (e.g. the C drive). I knew I'd already done this, but as Docker has been updated several times, I thought I'd verify. The setting was still checked to share the drive, but when I hit the "Apply" button it prompted me for my current credentials. And then it dawned on me that I'd probably changed my password 10 times since I originally configured Docker on this machine, so it was trying to use old cached creds to access the file system.

I'm surprised this hadn't reared its head before in some other way, but the morale of the story is, when you change your Windows password, make sure you remember to update it in Docker as well.

HTH


Comments (0)

Skip to main content