Skip to content
Dockerised CiviCRM build-kit
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Dockerised CiviCRM Buildkit (dcbk)

This currently a simple vanilla docker container for the CiviCRM Buildkit based on the buildkit full stack ubuntu instructions with inspiration from progressivetech's efforts.

The Dockerfile extracts the logic from civi-download-tools (this version).

The standard docker flow is to:

  • build an image (takes a long time with plenty of downloads)
  • create a container based on this image
  • start the container
  • exec commands in the running container

The "clean-up and rebuild" steps are in the script. The script also provides details on using you container via the CLI once you have built it.

Set up your hosts file for browsing

In order to use your browser you will need to add entries to your computers /etc/hosts file.

Find out the IP address of your container with:

docker inspect buildkit | grep IPAddress

For example, if your "CMS_URL" is http://dmaster.localhost and your containers IP address is add this to /etc/hosts: dmaster.localhost

SSH and your docker

I am currently using docker to open a CLI shell, but you may wish to ssh into your docker. While apparently this is not standard practice, if do want to then this is how (I think):

First generate a key with ssh-keygen. Call your key id_rsa_bk. After generating your key if you look in your ~/.ssh directory with ls -lat ~/.ssh/*_bk* you should see these two files with these permsission settings:

-rw------- 1 [you] [you] 1675 Jan 21 14:15 /home/[you]/.ssh/id_rsa_bk
-rw-r--r-- 1 [you] [you]  392 Jan 21 14:15 /home/[you]/.ssh/

Second, copy your public key into this directory:

cp ~/.ssh/ .

Third, add these lines to your ~/.ssh/config file:

Host bk
HostName localhost
Port 2222
User ampuser
IdentityFile ~/.ssh/id_rsa_bk

You may then ssh into your container with

ssh bk

And you can use rcp to copy files around (should you need to)

rcp -r bk:/opt/buildkit .
You can’t perform that action at this time.