When we started to create our own Docker images we didn't have much experience in this area. I think our current solution solves many problems but leaves one problem open: it's too complex. It it good for our first try, we learned many things from it and got a lot of useful preliminary work on our Docker images but I think we should move on.
When I try to use some software through Docker I visit Docker Hub and search for a name: syslog-ng
. I don't care what's the underlying operating system I'm only interested in the software.
If I want to use a specific version I expect to work the following commands:
# this downloads the latest released syslog-ng
docker pull balabit/syslog-ng:latest
# this downloads a specific syslog-ng release
docker pull balabit/syslog-ng:3.7
docker pull balabit/syslog-ng:3.6.4
I think latest
should be an alias to 3.7
(as now).
I propose the following simplifications for the base images (when the users want to run syslog-ng in a Docker container):
- support only one image:
- we should decide what should be the OS we depend on (Debian Jessie, latest Ubuntu LTS, etc.),
- name it as
balabit/syslog-ng
, - use version tags on it,
- provide the default configuration, but give some hints how to use it with custom configs, like this:
FROM balabit/syslog-ng:3.7
COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf
- build these images from the packages in our own OBS repo,
- I expect these requirements for incubator, too:
- one
balabit/syslog-ng-incubator
image with version tags, etc...
If I use a Docker image as a developer I just want an environment, where I can build the source code and do some testing. I prefer to store the git repository on my host system and mount it into the Docker container. So I assume the following conditions are met:
- developers have git and some editor installed on their host machine,
- they expect to build and test syslog-ng in the developer images,
- the developer tools (make, gcc, git) work the same way on every popular Linux. The point is I don't care about the underlying OS as far as I can compile and test syslog-ng without touching the OS. Nevertheless, installing some packages on a popular Linux distribution isn't so hard and a required skill for a developer. Though I know developers are touchy about their favorite Linux distribution (and text editor of course).
- create one development image, which contains all the developer tools to compile and test syslog-ng (git, make, gcc, etc.)
- create some documentation about the usage of the images
Incubator:
- it can be built atop the base image + needs the developer tools. We may set some environment variables to ease its usage (PKG_CONFIG_PATH, etc.)
I would like to see 4 images:
balabit/syslog-ng
: syslog-ng installedbalabit/syslog-ng-incubator
: syslog-ng + incubator are installedbalabit/syslog-ng-dev
: dev environment with dev tools + dependenciesbalabit/syslog-ng-incubator-dev
: syslog-ng installed + dev tools + dependencies for incubator modules
👍
KISS: Keep it simple, stupid
A good indicator would be that a developer can start contribute to syslog-ng in 10 minutes. These concepts that @ihrwein stated above is a great way to ensure out-of-the-box usage of our Docker images.
Base image
Developer image
gdb
,valgrind
should be includedproject
directory and compile that inside (like in my Vagrant env)Getting started in five minutes