Showing posts with label containers. Show all posts
Showing posts with label containers. Show all posts

Thursday, April 17, 2025

Sitecore Container Prerequisites Script Updates



Heads up!  I’ve made some recent updates to the open source Sitecore Container Prerequisites script to keep things aligned with the latest Sitecore versions and development environments.

What’s new:

  • ✅ Added support for Sitecore 10.3.2 and 10.4.0

  • 🖥️ Improved OS compatibility checks for Windows 10 and 11

  • 📄 Refined the README with clearer instructions for installation, usage, and contributing

  • 🔗 Updated package download links and references to current installation guides

Sitecore Container Prerequisites script remains a helpful utility for preparing your Windows machine to run Sitecore containerized environments smoothly. 

Feedback and contributions are always welcome!

📍 View the GitHub repo

Monday, July 26, 2021

Docker Compose Failing; 'unknown flag: --d'

My Windows Docker installation was recently updated to version 3.5.2 (66501), after which commands like docker-compose up --d failed with the following errors:

level=warning msg="network default: network.external.name is deprecated in favor of network.name" not implemented


unknown flag: --d


As it turns out, this is due to an experimental feature that seems to be enabled by default in Docker's Experimental Features settings:


The solution, for now, was to simply disabled the experimental feature by unchecking the `Use Docker Compose V2` checkbox in the settings; or run `docker-compose disable-v2`.
More information about the Compose V2 beta CLI can be found here: 

Compose V2 beta | Docker Documentation

Wednesday, May 26, 2021

Resolving Docker Container Networking Issues while connected to VPN using Cisco AnyConnect

After prepping and polishing a custom legacy Sitecore 8.2 Docker environment for our developers, we ran into a significant blocker that had us questioning whether we needed to backtrack and use locally installed Sitecore instances instead. 

The blocker stemmed from this particular client's VPN: Cisco AnyConnect Mobility Client. 🤮

At a high level, any time we connect to the VPN using Cisco AnyConnect, the running containers would begin to misbehave - and symptoms disappeared after VPN was de-activated.  

Symptoms included:

  1. Inability to use custom hostnames to access the site (pings from the host to the CM and Solr hostnames failed with an `Unreachable` or `Request Timeout` code).
  2. Inability to use the localhost:portnumber hostname to access the site.
  3. Complete loss of internet access from the running containers.

Because a VPN connection is required for several API-based components, it was essential to solve this.  


Some of the troubleshooting attempts included:

  • Switched ISOLATION mode from isolation to hyperv.
  • Checked and uncheck various options in the Cisco AnyConnect settings (including `Allow local (LAN) access when using VPN`).
  • Checked and unchecked various Docker settings under the General tab in Docker Desktop settings (`Expose daemon on tcp://localhost:2375 without TLS`).
  • Asserted local firewall settings.
  • Applied DNS overrides to the Docker Engine daemon.json file that matched the active DNS configuration for the VPN endpoint.
  • Applied various parameters to the docker-compose.yml file (dns, extra_hosts, etc.)
  • Fiddled with various `Advanced TCP/IP Settings` under Control Panel\Network and Internet\Network Connections in Windows.
  • Created custom Hyper-V and Docker bridge/transparent networks to try to restore internet connectivity. 
The number of tabs I had opened in my browser was unfathomable without much to show for it.  There were undoubtedly many similar issues reported across the web related to Cisco AnyConnect and Docker, but no suggestions remedied the problem.

After hours of troubleshooting, I tried to replicate the behavior with other VPN connections not using the Cisco AnyConnect client and found that none of the symptoms were present.   I couldn't find any evidence that this is an issue with Docker itself but instead caused by how Cisco AnyConnect handled connections and IP routing.  

I then came across a comment in a thread related to drive sharing with Docker when using AnyConnect: https://github.com/docker/for-win/issues/360#issuecomment-442586618 

I ♥ you, jrbercart

Since we don't have any pull over the client's VPN setup and configuration, I decided to try OpenConnect as a substitution for Cisco AnyConnect, which evidently uses the same protocol to establish a VPN connection.  

I connected to the client's VPN endpoint using OpenConnect, and all of the networking issues with the running Docker containers disappeared!  

If you happen to find yourself in a similar situation, go ahead and drop Cisco AnyConnect and give OpenConnect a try to save yourself some troubleshooting hours! ☺

Friday, February 26, 2021

Sitecore Containers Prerequisite Check for Local Environments with PowerShell

If you're looking to finally dive into the world of Docker, there's no better time than now with the release of 'Sitecore XP 10.1 Initial Release'.  If you haven't worked with Sitecore Containers yet, you'll need to settle several prerequisites before starting. 

As a callback to when Sitecore 9 and SIF were all the rage and new machine prerequisites were aplenty (ref Sitecore 9 Machine Prerequisites Check with PowerShell), I spent some time developing a new,  menu-driven PowerShell script to facilitate the validation of prerequisites when setting up a local development environment using Sitecore Containers.

The sitecore-containers-prerequisites.ps1 script sets out to:

Quickly verify Sitecore Container:
  • Hardware requirements (CPU, RAM, Disk Storage, and presence of SSD)
  • Operating system compatibility (OS Build Version, Hyper-V/Containers Feature Check, IIS Running State)
  • Software requirements (Docker Desktop, Docker engine OS type Linux vs. Windows Containers)
  • Network Port Check (443, 8079, 8984, 14330)
Download and Install required software:
  • Chocolatey
  • Docker Desktop
  • mkcert 
Enables required Windows Features
  • Containers
  • Hyper-V 
Download latest 10.1.0
  • Container Package ZIP 
  • Local Development Installation Guide PDF

Demo

Selecting 'Scan All Prerequisites' option will execute all scan options (effectively each individual scans -- which are also available):


Here's a demo of the script identifying that Docker is set to use Linux Containers instead of the required Windows Containers:



I hope this helps folks new to Sitecore Containers get started confidently, knowing their machine is ready - and also bring some simplicity to those accustomed to developing with Sitecore Containers and are just setting up a new machine.

You can grab a copy of the script here: https://github.com/strezag/sitecore-containers-prerequisites 

As always, feel free to use and modify the script to fit your needs.
Leave a comment if you have any suggestions or recommendations, too!