Dear BaseX community,
over the last weeks, interest in Docker utilization with BaseX hevily increased, and several images have been proposed. I've already made some experience running a BaseX pet project in BaseX for about a year now, and together with the BaseX core team created an image based on those experiences and current best practices.
basex/basexhttp Docker Image ----------------------------
Finally there's the official basex/basexhttp Docker image readily available on the Docker Hub. It's an automated build directly from source, with nightly builds and tagged builds for future BaseX releases (starting with 8.4.1/8.5, whatever will come first). It is derived from the Maven base image (and thus Debian), and is automatically updated when the base images experience updates (like Java security fixes).
- https://hub.docker.com/r/basex/basexhttp/ - https://github.com/BaseXdb/basex/blob/master/Dockerfile
While the image is named basexhttp and always includes the HTTP server, it can also be used for running the plain basexserver or even basexclient.
DBA Application Container -------------------------
As an example for deriving your own application images and also for interfacing BaseX for administrative tasks and ad-hoc queries, the DBA is also made available as a container.
- https://hub.docker.com/r/basex/dba/ - https://github.com/BaseXdb/basex/tree/master/basex-api/src/main/webapp/dba
Documentation -------------
As you're used to, documentation is available in the BaseX wiki.
- http://docs.basex.org/wiki/Docker
- - -
If you've got any feedback, questions or proposals, feel free to get in touch with me or the core BaseX team on the usual ways.
Kind regards from Lake Constance, Germany, Jens
Cool--I'll try it as soon as I can. I have my own BaseX-based container with a custom Web app working now, but based on my own small mod of an earlier Dockerfile. Looks like this version addresses the issue I had (creating volumes in the base container made it impossible to add repos or webapps in using Dockerfiles).
Cheers,
Eliot ---- Eliot Kimber, Owner Contrext, LLC http://contrext.com
On 2/19/16, 3:54 PM, "Jens Erat" <basex-talk-bounces@mailman.uni-konstanz.de on behalf of jens.erat@uni-konstanz.de> wrote:
Dear BaseX community,
over the last weeks, interest in Docker utilization with BaseX hevily increased, and several images have been proposed. I've already made some experience running a BaseX pet project in BaseX for about a year now, and together with the BaseX core team created an image based on those experiences and current best practices.
basex/basexhttp Docker Image
Finally there's the official basex/basexhttp Docker image readily available on the Docker Hub. It's an automated build directly from source, with nightly builds and tagged builds for future BaseX releases (starting with 8.4.1/8.5, whatever will come first). It is derived from the Maven base image (and thus Debian), and is automatically updated when the base images experience updates (like Java security fixes).
While the image is named basexhttp and always includes the HTTP server, it can also be used for running the plain basexserver or even basexclient.
DBA Application Container
As an example for deriving your own application images and also for interfacing BaseX for administrative tasks and ad-hoc queries, the DBA is also made available as a container.
https://github.com/BaseXdb/basex/tree/master/basex-api/src/main/webapp/dba
Documentation
As you're used to, documentation is available in the BaseX wiki.
If you've got any feedback, questions or proposals, feel free to get in touch with me or the core BaseX team on the usual ways.
Kind regards from Lake Constance, Germany, Jens
-- Jens Erat
OpenPGP: 0D69 E11F 12BD BA07 7B37 26AB 4E1F 799A A4FF 2279
Hi Eliot,
Looks like this version addresses the issue I had (creating volumes in the base container made it impossible to add repos or webapps in using Dockerfiles).
that's also one of the issues the earlier Dockerfile of Dirk and Michael had -- and I also had issues with that when I started with Docker. It's somewhat counter-intuitive that you have to `EXPOSE` ports to publish them, but not define `VOLUME`s to bind them.
Defining a volume in a Dockerfile results in a bind-mount of a new, empty folder (if not defined otherwise through `--volume[-from]`) during container instanciation. So you can very well add files into the image -- but they're hidden by that bind mount in the running container.
Regards, Jens
The problem was that I wanted to add files to the /webapp directory, but once the Dockerfile defines it as volume you can't modify it as part of the container definition, you can only mount to it from outside.
My general approach is to have two images, one without the volumes, for use in defining derived containers, and a working image that defines the volumes so they are ready for mounting from other containers or from the host.
I suppose another way to handle it is to not define the volumes at all and then do it in Docker-compose scripts (I'm using docker-compose to manage all my related containers and provide a convenient way to manage everything through one command).
Cheers,
E. ---- Eliot Kimber, Owner Contrext, LLC http://contrext.com
On 2/19/16, 4:27 PM, "Jens Erat" jens.erat@uni-konstanz.de wrote:
Hi Eliot,
Looks like this version addresses the issue I had (creating volumes in the base container made it impossible to add repos or webapps in using Dockerfiles).
that's also one of the issues the earlier Dockerfile of Dirk and Michael had -- and I also had issues with that when I started with Docker. It's somewhat counter-intuitive that you have to `EXPOSE` ports to publish them, but not define `VOLUME`s to bind them.
Defining a volume in a Dockerfile results in a bind-mount of a new, empty folder (if not defined otherwise through `--volume[-from]`) during container instanciation. So you can very well add files into the image -- but they're hidden by that bind mount in the running container.
Regards, Jens
-- Jens Erat
OpenPGP: 0D69 E11F 12BD BA07 7B37 26AB 4E1F 799A A4FF 2279
The problem was that I wanted to add files to the /webapp directory, but once the Dockerfile defines it as volume you can't modify it as part of the container definition, you can only mount to it from outside.
My general approach is to have two images, one without the volumes, for use in defining derived containers, and a working image that defines the volumes so they are ready for mounting from other containers or from the host.
I suppose another way to handle it is to not define the volumes at all and then do it in Docker-compose scripts (I'm using docker-compose to manage all my related containers and provide a convenient way to manage everything through one command).
The way it meant to be is usually adding logic/program code to derived images, and putting data/information into volumes. How those are managed depends on personal needs, preferences and the available infrastructure.
THis way you can "throw away" containers at any time, they don't have any state left any more. To publish a new version, you simply start a new container from the updated image accessing the data, but don't have to pass any application logic into the container.
Relying on docker-compose is a good thing to do, it also easons up migrating to a Docker swarm or other infrastructure management tools.
basex-talk@mailman.uni-konstanz.de