I’ve been using it for my calendars and adressbooks already for more than 4 years now. However, I initially installed it as plain PHP application with a MySQL database. The developers also announced quite early, that they are working on a Docker image, but there is nothing useful as of mid 2018. So far they just provide a quite inconvenient how-to and a list of issues that apparently prevent them from providing a proper Docker image. Thus, I just dockerised the application myself :)
The Docker image
Actually, creating a Docker image for Baïkal was super easy. In the end, it is “only” a PHP application ;-) The corresponding Dockerfile can be found in the root directory of Baïkal’s git repository (at least in my fork). The latest version at the time of writing is:
So, it basically
- installs some dependencies through
- installs the PDO-MySQL extension,
- installs composer,
- adds the Baikal sources into the image,
- and finally installs remaining Baikal dependencies through composer.
I distribute the image as binfalse/baikal.
Using the Docker image
Using the image is fairly simple.
Basically, you only need to mount some persistent space to
docker run -it --rm -p 80:80 -v /path/to/persistent:/var/www/Specific binfalse/baikal
To start with, you can use the original Specific directory from the Baïkal repository.
Then head to your Baikal instance (which will probably redirect to
BASEURL/admin/install), and setup your server.
Every configuration will be stored in the mounted volume at
To support encrypted connections you would need to mount the certificates as well as a modified Apache configuration into the container. However, I recommend to run it behind a reverse proxy, such as binfalse/nginx-proxy, and let the proxy handle all SSL connections (as for all other containers). This way, you just need one proper SSL configuration.
The default SQLite database is perfect for a first test, but is slow and just allows for a limited amount of SQL variables. If you for example have more than 999 contacts, the first sync of a clean WebDAV device will result in an exception such as:
PDOException: SQLSTATE[HY000]: General error: 1 too many SQL variables
Thus, for production you may want to switch to a proper database, such as MariaDB. Lucky you, the Docker image supports MySQL! ;-)
To reproducibly assemble both containers, I recommend Docker-Compose.
Here is a sample config with two containers
This assumes, that your Baikal configuration can be found in
The database will be stored in
Also note the database credentials for configuring Baikal.
If you’re not running a reverse proxy in front of the application, you also need to add some port forwarding for the
- apache (14) ,
- cloud (3) ,
- config (12) ,
- php (5) ,
- docker (12) ,
- webdav (1) ,
- http (4) ,
- mail (8) ,
- network (72) ,
- private (26) ,
- sync (3)