Skip to main content

Back-End Development

Sitecore Containers without Docker Desktop

Abstract Information Blocks

As the IT industry has increasingly started embracing containerization, it has become a cornerstone of modern software development. Sitecore is not an exception. Sitecore announced official support for containers from the version 10 initial release. Since then all of us have started using Docker Desktop to run Sitecore’s containerized solution.

If you are new to Docker and Containers, You can go through Bootcamp on Docker by my friend Eric Sanner.

Docker Bootcamp Blog Series

But Docker Desktop is paid for commercial use. As I do not use its GUI much except for some nominal work, I thought of looking for its alternatives. Surprisingly, I learned that running Containers without Docker Desktop is possible.

 

Docker Desktop

This is roughly the composition of Docker Desktop. Under the hood, it utilizes Docker Engine. Additionally, it provides a decent Graphical interface to interact with Docker Engine.

It is good to have but not a necessity. All you need is a Docker Engine.

It is an open-source containerization technology for building and containerizing your applications.

Let us set up a Docker Engine on your machine to run Windows Containers.

Note : Though this article specifically targets Sitecore Containers, This Docker Engine setup process should be common for all those who wish to run Windows Containers.

There are a few really helpful articles about how to do it. Thank you for giving me a head start !!

Unfortunately, I already had Docker Desktop installed so I landed into a few issues. While fixing those I realized that it is better to pristine my machine. If you don’t, you may face weird issues due to unremoved files of the Docker Desktop.

Now let’s start with the action !!

Disclaimer – This will remove all your containers and images but eventually it will be downloaded when you run your instance.

  • Clean up

    • Uninstall ‘Docker Desktop’ from your machine
      • You can try running ‘docker version’ after uninstallation which should throw an error saying ‘docker is not recognized’
    • Even after uninstallation, a few files remain buried in your drive. Let’s remove them if present at the following locations. (If you face problem while deleting files, especially windowsfilter folder inside docker, do check this blog.  If at worst nothing works, you can rename it like adding a ‘-old’ suffix, although it is not advisable.)
      • C:\docker
      • C:\ProgramData\docker
      • C:\Program Files\docker
      • C:\Users\{your-user}\.docker

Once this clean-up is done, we will be ready to set up the Docker Engine. (Here is a link to scripts to automatically execute all below steps.)-

  • Setup Docker Engine

    • You need to download latest Docker Engine binary from here.
    • Extract it and register Docker Daemon as a Windows Service with this command
      • dockerd –register-service  (Note : there are two consecutive hyphens before register)
    • Add this path in Environment Variables
      • This bridges a gap between OS and Docker Daemon. Now you can run commands anywhere in your machine.
    • Test command – docker version

Your Docker Engine should be setup now. (Since we are focusing on Sitecore, we will setup Engine to support only Windows containers)

  • Install Docker Compose Plugin

  • Set Rights for Current user

    • This can be an optional step if the logged-in user has Admin Rights. Personally, I did this to rule out any future rights-related issues.

 

Once this is all done, there is no harm to restart 😉 And finally, you should be ready to spin up containers.

But wait, it’s not over yet. I have a surprise for GUI lovers. You still have few alternatives,

  • Use the Containers window in Visual Studio
    • It provides you a handy way to monitor Containers in Visual Studio. Check more details here
    • It is available in Visual Studio 2022 or Visual Studio 2019 version 16.4 or later
    • Make sure to run VS as admin, otherwise, you may see this error – Docker Desktop is not running. Please start Docker Desktop and try again.
  • Docker in Visual Studio Code
    • A very similar extension for VS Code from Microsoft. Check more details here

And CLI lovers, here is a docker cheat sheet from Sitecore for you.

I am working on compiling the below information. Stay tuned!

  • Troubleshooting guide for bugs faced while setting up Docker Engine
  • Docker Engine update scripts

That’s all for now!  You are all set to work on your containerized Sitecore solution without Docker Desktop now.

Thoughts on “Sitecore Containers without Docker Desktop”

  1. In over two decades of IT work, I think yesterday is the first time researching a problem where the answer was on a blog post made on the day I’m searching. I am getting started with docker on Windows and was trying to find out if compose and buildx, which were removed from the windows docker engine binaries in February, could be installed separately or if they were even necessary for what I was trying to do. It turns out a windows buildx binary can be obtained the same way you’ve obtained compose. Once I got started, it turns out neither were necessary, and I could do everything I was trying to do with the Windows binaries distributed with the docker engine. Anyway, thanks for making this blog post yesterday before I started searching for pages on docker on windows without docker desktop made after 2023-02-01.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Vikrant Punwatkar

I am a Sitecore 9,10 certified developer with 12 years of experience.

More from this Author

Follow Us
TwitterLinkedinFacebookYoutubeInstagram