As many of you may know, and I'm sure you find out if you go to download it, Docker Desktop is no longer free. While I don't think they have a mechanism to check these things, technically if you're on a bigger team or your company earns a good chunk in revenue, you're supposed to pay for it now. And a Docker account does get you some benefits.
But...it's one of those "carpet pulled from under your feet" things, isn't it? Kind of like when Oracle said you had to start paying for JDK, and all us Sitecore developers were using it for Solr, and were like "uh, what?!?" Of course, now everyone knows how to use OpenJDK, and Sitecore even baked that into its setup scripts. So, similar principle.
Fortunately, it's only a few things needed to get Docker running "in the wild" so to speak. Fire up your trusty Powershell prompt and start here:
choco install docker-engine docker-compose docker-cli
choco install Containers Microsoft-Hyper-V --source windowsfeatures
This gets the basics of Docker installed for you, including the engine and command structure. Also, for Sitecore folks, it gets Hyper-V installed and ready for Windows containers.
The next bit you may not have to do, but I definitely did. When I tried to fire up my docker-compose process after removing Docker Desktop and using the commands above, I got errors in my solution build trying to hit the Nuget site. The fix is to update the C:\ProgramData\docker\config\daemon.json
file (which you could do in the settings in Docker Desktop). Our version that worked is as follows (your mileage may vary on this one):
{
"registry-mirrors": [],
"insecure-registries": [],
"debug": false,
"experimental": false,
"dns": [
"10.1.2.3",
"8.8.8.8"
],
"features": {
"buildkit": false
},
"builder": {
"gc": {
"enabled": true,
"defaultKeepStorage": "20GB"
}
}
}
Finally, you need to start the Docker Engine service; it was installed above but not started. Again, Powershell, and run this command:
start-service -displayname "Docker Engine"
The other nice thing Docker Desktop provided was monitoring of your containers and images, as well as quick access to logs and a terminal prompt. Well, there's another tool that can do that for you...Visual Studio. I believe the "classic" Visual Studio has it, but I use VS Code for this one. If it isn't already installed, check your extensions for the Docker and Docker Explorer ones at the vary least. Once you do this, you'll have a sidebar item for Docker that will give you access to everything you need. The one catch is you may need to either run VS Code as an administrator, or set up your Docker Engine service to run as an administrator. I chose the first option myself, but do what works for you (subject to your company policy of course!).
Top comments (1)
I had a sitecore nextjs docker setup working (from here-> doc.sitecore.com/xp/en/developers/...).
After uninstalling docker, I followed the above steps, but I am get the following error when I run the up.ps1 script file. Any thoughts on why this could be happening please?
[+] Running 12/13
~~~~~~~~~~~~~~~~~