Skip to content

Docker

In the Docker approach, you run all components (PHP, MySQL, buildkit) in Docker containers.

Trade-offs
  • Pro: The Docker approach works well on Linux. It is also compatible with Windows and MacOS. Configuration is packaged, editable, and disposable.
  • Con: Using Docker feels like using a remote server, so it may be difficult to integrate debuggers and other desktop tools. For Windows/MacOS hosts, it requires a virtualization layer, and file-sync be a drag on performance.

Requirements

  • Docker and Docker Compose
  • Intel/AMD CPU (The Docker core is compatible with other CPUs, but there are currently compatiblity issues with specific containers.)

Download

You can download one of the following projects to run buildkit within a Docker container:

Note

There are different versions of Buildkit on Docker. Michael McAndrew's seems to be the easiest to get started with on Linux.

Download buildkit on docker on ubuntu

After install docker and docker-compose, download the container descriptions:

git clone https://github.com/michaelmcandrew/civicrm-buildkit-docker.git
cd civicrm-buildkit-docker
sudo docker-compose up -d

Now you are ready to go.

To create a new site with buildkit run the following command:

docker-compose exec -u buildkit civicrm civibuild create dmaster --url http://localhost:8080

Alternative you can login into the conatiner and run the commands from there:

docker-compose exec -u buildkit civicrm bash

More information is in the Readme: https://github.com/michaelmcandrew/civicrm-buildkit-docker/blob/master/README.md

Next steps

Once you are able to run commands on the civicrm container, you can move on to using using civibuild.