If you're reading this soon after I post it then it's very nearly the end of the "grace period" where anyone can run Docker Desktop. As of 1st February if your business meets certain requirements you have to pay for each user. So what can us Sitecore devs do if we aren't in a position to pay that fee? Well the good news is you can run Docker without the Desktop bit, and it's not too tricky once you wrap your head around a few things...
I spent some time working with a colleague who couldn't get his docker instance to start up happily this week. And it's reminded me that for all its positives, there are still some challenges with understanding the underlying issues when a developer container instance breaks. I realised I need a "go read this" post for the start of future discussions like this, so here are some problems you might see, and some diagnostic suggestions I wanted a convenient way to share:
I was asked to enable Sitecore's ItemService endpoints on a containerised instance of Sitecore recently, and my first pass through this didn't work. Turns out there's a key bit of documentation that seems to be missing for this scenario. Hence a quick post to help get info into Google. So if you need to do this, read on:
I bumped into an interesting issue recently, which I though others might come across. Trying to run a project with Dianoga in it didn't work properly in a developer's Docker container – it kept failing whenever it was asked to process an SVG image. Why didn't that work? Here's why:
A while back I wrote about some initial investigations I'd made towards having SolrCloud in a containerised Sitecore instance. Since I worked on that, Sitecore have shipped their "official" container approach, so I've revisited my experiments using the examples Sitecore provides.
Now that Sitecore 10 is out, I've been having a dig into the new Docker approach that's been released. There are some interesting differences here between Sitecore's official approach and the way the community scripts I'd experimented with worked – and I've learned a few interesting new things as a result of having a read of the examples provided. Here are the things that caught my attention:
I've got a project on the cards that I'd like to use docker containers for, but we're talking about using SolrCloud for search. Right now, there isn't a SolrCloud container in the Sitecore community container repo. So I started thinking about what would it take to make one.
I presented a session at the London and Manchester user groups recently, where I talked about what I needed to do in order to get started developing Sitecore code under Docker.
One of the minor annoyances of some XM releases of Sitecore is that rather than just disabling analytics and not running xConnect, they do not include the DLLs necessary for personalisation at all. That can be a bit of a pain sometimes – as I discovered recently when I tried to deploy some client code into an XM docker container. The site broke because the client code included references to a personalisation DLL – which made me realise I actually wanted an "XP in XM mode" container so I didn't need to bother with the memory and CPU for xConnect. So here's how I hacked one up...
The approach I read on how to "how to attach your debugger to Sitecore inside Docker" by running
to fetch the current IP address, and pasting it into Visual Studio can be a bit of a faff. So I got to wondering: Are there other ways to achieve the same result?