5
SmarterMail Docker Image
Idea shared by Colin M - 2/4/2019 at 9:33 AM
Proposed
Docker is quite well supported now by Microsoft; they even package IIS and SQL Server in Docker containers.


Having SmarterMail in a Docker container would make it easy to perform upgrades, rollbacks (obviously assuming the data was backed up or compatible), and perhaps most importantly, test pre-release versions.

I'd love to test SmarterMail 17 right now but the hassle of installing and uninstalling, mucking with IIS settings, and risking messing up something on a production or secondary server is too much. If SmarterMail were a Docker container it would be trivial to try new versions on my laptop or a remote server, even on the production server using an alternate port.

Docker is not a toy or the latest fad, it is the way of the future and I think Microsoft's strong embrace is good proof of that. Installing your mail server by remoteing in with RDP to "double-click" an MSI installer is the way of the past and for very good reasons.

Not entirely related, but in a similar vein of reasoning, built-in Let's Encrypt support would be awesome as well.

7 Replies

Reply to Thread
1
Matt Petty Replied
Employee Post
I got a windows container version working a couple months ago. I also added a "mail-root" startup argument onto MailService.exe. This allows you to load off of an external system directory instead of the usual C:\Program Files (x86)\SmarterTools\SmarterMail\Service.

I HAD to add that setting into SmarterMail to support docker containers otherwise your system files would be stored IN the container. Using this "mail-root" for a custom service directory and a custom data path (not C:\SmarterMail), allows your container to not house any SM data except for the files necessary to run SmarterMail, while system config and data would all be externally stored.

This setting is now in SM 16 and 17 and has been for months since I added it in, purely for docker support. When I get some time I may document the process of creating a container and maybe even setup something automated. I've been looking to learn the Azure pipeline/project stack for a while now, this would give me a chance to get my feet wet with automating docker builds.

EDIT: I added in that mail-root as a test for getting docker to work. I figured it was useful so I left that mail-root option in, BUT it has been months since I tried that mail-root argument so heads up, things may break if you use it.
Matt Petty Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
Thanks for the info, Matt. While I'm very experienced with Docker, my experience is basically limited to Linux platform so I'm not really interested in pioneering my own Docker image. An officially-supported Docker image is what I am advocating and it sounds like there are no real blockers; just some testing, tweaking, documentation and pushing an image somewhere (Docker Hub being the obvious choice).

While there may not be a lot of people begging for this, if you had a solid Docker image I think pretty quickly people would adopt using it since the installation would be only a few steps:

- Enable "Containers" in the Windows features dialog if not enabled already.
- Create a volume for the data.
- Create a new container with the "smartertools/smartermail:17.x-beta" image.
- Profit.

Although my preferred method of managing containers is Docker Compose due to the readability as the config gets more complex, the first step is getting a basic working image out there. For it to be usable in production it will definitely need to support HTTPS/SSL, though.
1
Wondering if there has been any traction here - I'm currently maintaining an Azure VM strictly for SmarterMail - I would love to switch this over to a container.   A guide would be nice :)
0
Kyle Kerst Replied
Employee Post
@Robert - I think this is still an excellent suggestion - but is likely something development has not had a chance to revisit due to our focus on MAPI and other areas we're still fine tuning on our end. I did find some documentation on creation of Docker images (linked below) but am not familiar enough with these procedures to provide much in the way of specific guidance: 


If you do get this sorted out please ping me/support as we'd be happy to take a look and get this published as an official KB. I hope this helps! Have a good one!
Kyle Kerst System/Network Administrator SmarterTools Inc. (877) 357-6278 www.smartertools.com
0
Has anyone made any progress on a docker image that can run SmarterMail?
0
Hello,
@Matt Patty is it possible for you to share the Docker-File?
0
I am very interested in this too.  Please share the docker file. 

Reply to Thread