Skip to main content

Sitecore

Add Configuration for Non-Docker Desktop

Programer Codes On A Laptop Connected To Additional Screen

Configuring applications outside of Docker desktop environments needs to be done carefully. For seamless integration, we must know how to add the required configurations. In this article, we will explore the essential steps to successfully add configuration for a non-Docker desktop environment, ensuring efficiency and reliability in our development workflow.

As Vikrant Punwatkar explained in his “Sitecore Containers without Docker Desktop” article, running containers without Docker Desktop is possible. However, after successfully implementing this approach, it was observed that we could not debug the project source code.

Investigation

The default location of the configuration file on Windows is shown below. This “config” option allows us to set any configuration option for the daemon in a JSON format.

~\programdata\docker\config\daemon.json

Docker Folder

We can see that the “config” folder is missing from the above-mentioned path. As a result, our solution was acting strangely, and we could not debug the container-based source code.

Solution

The issue can be resolved once we add the required “config” folder and the required “daemon.json” file with the necessary configurations. It can be accomplished by downloading and executing the “Create Config File Script” which will automatically generate the necessary “config” folder and “daemon.json” file in addition to the necessary configurations.

Note: Any “PowerShell” script that we download and attempt to execute on a “PowerShell” terminal will result in the error below.

The file "specific PowerShell script file name" is not digitally signed. You cannot run this script on the current system.

This problem can be fixed by executing the following command on a “PowerShell” terminal.

 Set-ExecutionPolicy Bypass -Scope Process 

Steps to Add Configurations Manually:

    1. Check the “~\programdata\docker” path and see if the “config” folder is present or not.
    2. Create a folder and name it as “config”, if it is not present.
    3. Create a “daemon.json” file inside the “config” folder.
    4. Add the following data in the “daemon.json” file.
{
    "debug":  true,
    "dns":  [
                "8.8.8.8"
            ],
    "experimental":  false
}

Note:

  • These are the basic configurations, and they can be modified, or additional configurations can be added depending on the project and its requirements.
  • “DNS” configurations can differ based on the project and its architecture.

Conclusion

The configuration file while using “Docker Desktop” is generated automatically once we add or modify the required configurations from the “Docker Desktop Settings” menu. But in this scenario, we have to create it manually, as the “daemon.json” file is crucial for customizing and configuring the Docker daemon to meet specific requirements, including security, network, and resource settings.

Happy learning!

Thoughts on “Add Configuration for Non-Docker Desktop”

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.

Saket Singh

Saket Singh is currently working with Perficient GDC Nagpur as a Senior Technical Consultant. He is a Sitecore developer who works on SXA and Sitecore Headless websites. He also has knowledge of ASP.NET, ASP.NET MVC, C#, Web API, MSSQL, and JavaScript. He enjoys discovering new technologies and understanding the architecture that supports them.

More from this Author

Follow Us
TwitterLinkedinFacebookYoutubeInstagram