Playing With Docker

Given that I’ve said in the Facebook Group that it would be great if people started updating again, I figured I really ought to do the same myself.

Do As I Say Not As I Do. Or something like that anyway 🙂

So, anyway. I’ve been playing with Docker. I /really/ like it.

Docker is basically a way of creating little self contained services which run on a host system. In the case of why I’m playing with it (among other reasons) is because I can see how useful it would be for DearDiary Development.

One big advantage of Docker is that it doesn’t care what machine the environment is running on. The containerised application will run just the same whether the host is Linux, Windows or Mac. Probably others too.

I use a Windows machine at home. A Surface Pro 4 to be precise. I love the Surface Pro 4, it’s slim and lightweight and really powerful for a tablet / 2 in 1. I digress. The server upon which DearDiary operates is Linux. Until recently I had Macs as well. But now I’m broke so I had to sell them.

Is that the sound of the worlds smallest violin?

Anyways. Docker. Yes. Previously I have set up a development environment on my laptop. It’s an absolute nightmare to do. Set up Apache, then MariaDB, then PHP. It inevitably doesn’t work properly. And once you get it all set up and running, you have to adjust source code and config files to cope with the fact that the development environment is Windows based and the actual live site is Linux (and NGINX not Apache, but that’s another aspect too). Work, work work.

And you get to do it ALL again if you dare to have to reinstall your computer. It’s a fricken nightmare.

Docker on the other hand, once you have it set up it’s a case of running a shell script and everything gets installed for you. And setting up the actual applications is about a billion times easier in the first place because people have already pre-configured mostly everything to the way the average person would want.

So. I now have DearDiary.Net code stored on a private GitHub repository. This means I can reinstall my development environment and grab the DearDiary.Net code straight from GitHub. But, even better, that GitHub code not only houses the PHP code to run the service – it also contains the Docker scripts to build the web service, the database service and the WordPress service.

I’m still playing with it, but it’s looking very good so far.

An additional plus is this;

If I migrate to a bigger server in the future, or even just a different one, then so long as the new host supports Docker, it’s a simple case of running those scripts – the very same ones that install my development environment.

A new server should take literally minutes to set up instead of days.

It can only be good 🙂

Similar Posts


  1. Ha! Reading this is like listening to my youngest son talk! I love it. One of my other sons (I have three!) has a Surface. I was with him when he bought it. He is very fond of his too. It’s way more versatile than a Mac.
    I have an iMac now, but I have to tell you… the next time it needs replaced, I may be priced out myself. They are hideously expensive. Though I do enjoy many things about it. Not worrying much about viruses is one, and it is a pretty sexy machine. Basically just a monitor now, even thinner than my first iMac. Practically seems magical.
    I’m enjoying connecting with a few people from the way back machine on DD now. Getting the notifies up and running helped. Though I have noticed that quite a few people write, but don’t have any widgets at all and some don’t even have comments turned on which makes it hard to connect with them. It’s all about the networking!
    Hope your finances turn around soon. May God provide ‘parnassa’ (livelihood) for you my friend.

    1. Thanks for the comment and the finances thing. They’re OK – we’re growing Patreons at last. Would like more of course, but have to give something back for that to happen and it’s been SO long with no updates here that it’s not surprising it died a death. Notifies working has definitely been one of the things that’s getting it back to some potential again.
      I do like Mac I must admit. But having said that, I also like Windows 10. Windows Vista caused me to move. Windows 7 wasn’t enough to get me back. But Windows 10 on the Surface Pro has managed it.
      Unfortunately, for some, the amount of comment spam can be overwhelming. Hopefully the Google reCaptcha that should be installed on everyone’s diary should lessen that. I better check it actually works on other people’s diaries actually.
      Which is another good point about having all this on GitHub. They have an issue tracker built in, so I can put things in there to make sure they don’t get missed 🙂 I’m up to Issue #6 already… Hmmm

  2. Thank you for taking the time to write your diary/blog as well, Steve. I enjoy reading Yetzirah’s diary, yours, and a few others when I have the time. Life without Dear Diary would be a great loss. I love it here that much. I have tried my best with other diary sites, but they do not compare to Dear Diary at all. Dear Diary is the best in my book. When you went from the old DD site to the new DD site, I find Dear Diary now, being a Patreon myself, fun. I have found Dear Diary a great place, home away from home, and a place I have made my mark.
    I am a Mac user myself. I can use Windows if it is the only thing available where I do not have my computer. I prefer Mac over Windows. I use Opera as my browser. I am set in my ways at times, too.
    I am happy that you have found a program that can be utilized for what you do for Dear Diary.

Leave a Reply

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