SugarCRM 7 - Roll SugarCRM with Docker

Tue 07 April 2015


I find trying to replicate the SugarCRM environment locally a real pain. One of the main issues is simply that Sugar requires such old versions of PHP to be installed, especially compared to other web projects I have that implement the latest/greatest versions of PHP. Running multiple PHP versions simultaneously can be a pain. One solution is to use Vagrant but I find that too heavy for my needs, so I gave docker a go and found it a much faster/elegant solution.

Here's the steps to get yourself up and running.

1. MySQL

You'll need your own installation of MySQL for this. As I use Debian testing as a host I just installed MySQL on it and have my SugarCRM boxes point to the host using the dockerhost entry in /etc/hosts on each docker container.

There is nothing at all stopping you from creating another Docker instance running MySQL but I figured this was an unnecessary step and getting data persistence working with Docker can be a little annoying.

2. Getting the Docker config

Simply clone the repo for whichever version you intend to you use.

I have two versions of this setup for both SugarCRM Version 7.2(Needing PHP 5.3) and Version 7.5(Needing PHP 5.4).

Sugar-Docker 7.2 is here.
Sugar-Docker 7.5 is here.

3. Fill in Docker settings

Edit this script and change the containers ip to whatever your hosts ip is. Don't forget to set the folder to your SugarCRM code folder.


Change settings here if you wish to use a custom url to access Sugar or if you have multiple instances of SugarCRM installed.


Change any settings you might want to customise with PHP here.

4. Tell SugarCRM to use the right MySQL database

In config.php I just set the mysql host to dockerhost.

5. Hosts entry

Then on your host operating system make sure to point the virtualhost url to the box. For me, in my /etc/hosts I have this entry.


Because I've used stdout for logs you can see apache errors by running a command like this.

sudo docker logs -f sugarcrm72

Category: SugarCRM Tagged: docker devops sugarcrm


Quick Salt Minion Setup

Thu 12 June 2014

I find myself setting up salt minions a LOT. So I figured I'd write down the steps in this concise format.

On the minion

  1. sudo add-apt-repository ppa:saltstack/salt
  2. sudo apt-get update && sudo apt-get install salt-minion
  3. sudo echo '<salt-master-ip> salt' >> /etc/hosts //Or whatever the salt master is
  4. sudo salt-call …

Category: SaltStack Tagged: saltstack devops


Read More

Using PPAs with Salt-States

Thu 10 October 2013

I couldn't seem to find a decent tutorial on using PPA's to manage repos with salt states so I'm documenting it here.

Say you want to install golang using these steps on ubuntu:

sudo add-apt-repository ppa:duh/golang
sudo apt-get update
sudo apt-get install golang

Well, to replicate this into …

Category: SaltStack Tagged: saltstack devops linux


Read More

CLI Dash

Sat 31 December 2011

Due to being flu-ridden for the entire holiday period, I decided to write up a quick tool I've been wanting to write for ages. It's written in Python, so go easy, I'm no Python expert and I'm sick.

The tool is essentially a wee-little dashboard for your linux server.

It …

Category: Projects Tagged: cli-dash devops


Read More
Page 1 of 1