/docker-basexhttp

A docker image for Basex including the BaseX HTTP Server

BaseX Dockerfile

This repository contains Dockerfile of BaseX for Docker.

Installation

  1. Install Docker.
  2. Simplest is to download our automated build by running docker pull basex/basexhttp

Otherwise, you could clone this repository by running git clone git@github.com:dirkk/docker-basexhttp.git and build the docker image docker build -t basexhttp .

Usage

docker run -p 80:8984 --rm -it --name=basexhttp basex/basexhttp

This will run BaseX with the HTTP port listening on port 80 (the default HTTP port).

Attach persistent/shared directories

docker run -p 80:8984 -p 1984:1984 --name basexhttp -v <data-dir>:/data -v <repo-dir>:/repo -v <restxq-dir>:/webapp --rm -it basex/basexhttp

This will attach your directories (which you have to define in the <> parts) as data, repo and restxq directories, respectively. Also, it will bind the BaseX server port, so you can access the BaseX Server using a BaseX Client.

If you want to start the process in the background you can use the flag -d and drop the --rm -it flags.

Open http://localhost in your browser to see your RESTXQ page.

Under Windows and OS X you need to use the IP address of the Docker machine, which you can get using the command:

docker-machine ip default

E.g.: http://192.168.99.100:80

Use a different BaseX version

We do use tagged automated builds, so you can download a different docker build at our build page. For example, to use BaseX 8.2 you can issue

docker pull basex/basexhttp:8.2