We would like to provide a simple way to deploy and run Apache Bookkeeper with an official Docker image.
We decided to not make a request to official docker images library in order to maintain implementation freedom and to not require a third party approval for every change to our dockerfiles. The choice is to create builds for Apache docker user, so we will have images named "apache/bookkeper:4.4.0" instead of "bookkeeper:4.4.0".
Current docker image proposal is hosted on https://github.com/caiok/bookkeeper-docker
Main emphasis points are shown below.
The proposed image:
- Is very similar to Zookeeper one (here the github sources)
- Is based on Alpine Linux, a very appreciated distro for docker image (for lightweightness and security orientation)
- Problem: Alpine uses a lightweight libc implementation that could lead to some compatibility issues with some system specific java libraries. The only problem I encountered so far is with Linux native epoll in Netty 4 (an issue for BK 4.5.0).
- Follows nearly all docker official image guidelines
Problem: it currenty lacks only the key import in gpg signature verification. The best practice is:
In current docker build "gpg --keyserver" and "gpg --batch" are commented.
Providing a way to verify downloaded release is not mandatory, but it's a nice to have.
Directory Structure and Repository
- We will include bookkeeper build files in the main repository, in a directory named "bookkeeper-docker".
- We will provide a docker build file for each released version (starting from 4.4.0). Each build will be contained in a subdirectory named like the label we want to assign to it (i.e "4.4.0/" for image "apache/bookkeer:4.4.0").
- The docker build file and all related files contained in these subdirectories will be used by dockerhub to create automated builds for every version.
- Question: could be useful provide a docker build "onbuild" for the last snapshot of the current development version?
- Main directory will contain the Readme to be shown in dockerhub image page
- Currently main directory contains a Makefile that shows how to use bookkeeper image in order to build up a fully functional ensemble of 1 zookkeper, 3 bookies and 2 bookkeeper tutorial (a simple dice rolling application) containers. This makefile has been very useful to me in order to test builds and could be useful to who is approaching bookkeeper providing a functional example to play with, but it could be easily removed, if desired.