Skip to content

cduverne/koha-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Koha Docker Container

This project builds a Docker image containg an installation of the library system Koha.

If you don't want to build the Docker image yourself we automatically build and push new versions of the image to Docker Hub Registry on every push to this GitHub repository. New images are given tags that correspond to the git head revisions in the git repo. See the section Using the Koha Docker image for more information.

As Docker is only supported natively on Linux, we build and test our Docker image inside a VirtualBox build machine. To make it easier to work with VirtualBox we use Vagrant for provisioning the virtual build machine. If you want to build the image yourself you need to install Virtualbox and Vagrant first (on Windows you also need some 'nix tools through e g Cygwin).

The image is built from a Dockerfile which also invokes Salt states. (The use of Salt preceeded our use of Docker, which is why it is still around.)

The Docker image produced uses currently released Debian packages of Koha.

There is also a Docker setup for a Koha development version from git available in the subfolder kohadev. Please read the README in this folder for further instructions.

The image will on startup go through the steps of the Koha Webinstaller accepting default settings, and choosing MARC-flavour: MARC21.

Using the Koha Docker image

This section assumes some understanding of Docker, and a machine (virtual or physical) capable of running Docker.

Download image from Docker Hub Registry

docker pull digibib/koha:[tag/revision]

The tag/revision should correspond to the git revisions in this git repository.

Starting a Koha Docker container

docker run -d --name koha_docker \
	-p 6001:6001 -p 8080:8080 -p 8081:8081 \
	-t digibib/koha:[tag/revision]

The tag/revision is as above.

It takes a little while for the Koha startup to complete.

Accessing Koha

Starting Koha as explained above makes the OPAC available on port 8080 (http) and Intra on port 8081 (http). The SIP-server is available on port 6001 (tcp).

Credentials

You should set credentials for the Koha instance database user on container startup (to avoid default values), you can also set the Koha instance name, and SIP-server settings :

docker run -d --name koha_docker \
	-p 6001:6001 -p 8080:8080 -p 8081:8081 \
	-e KOHA_INSTANCE=[koha instance name, default: name] \
	-e KOHA_ADMINUSER=[db admin user name, default: admin] \
	-e KOHA_ADMINPASS=[db admin password, default: secret] \
	-e SIP_WORKERS=[no of workers, default: 3] \
	-e SIP_AUTOUSER1=[username, default: autouser] \
	-e SIP_AUTOPASS1=[password, default: autopass] \
	-t digibib/koha

External MySql

[TBW]

Logs

Log entries from a number of logs will be concatenated into standard out and can be seen using: docker logs koha_docker

The logs tailed to standard out:

  /var/log/apache2/access.log
  /var/log/koha/${KOHA_INSTANCE}/intranet*.log
  /var/log/koha/${KOHA_INSTANCE}/opac*.log
  /var/log/koha/${KOHA_INSTANCE}/zebra*.log
  /var/log/apache2/other_vhosts_access.log
  /var/log/koha/${KOHA_INSTANCE}/sip*.log

Installing virtual build machine

If you want to build the image yourself you need to install and set up a virtual build machine.

  1. Install virtualbox and vagrant:
  2. Clone this repo from the command line (in a directory of your choice): git clone https://github.com/digibib/ls.ext.git
  3. cd ls.ext into your cloned repo.
  4. From the command line run: make to bootstrap the environment.

Building the Koha Docker image in the build machine

Using Makefile, the following commands are available:

make : sets up and provisions virtual box

make reload : reloads box

make halt : stops virtual box

make up : starts box (no provisioning)

make provision: provision box

make build : build docker image (takes a while the first time)

make mysql_start : setup a mysql container

make mysql_stop : stop and remove a running mysql container

make run : run/start koha container and link to running mysql container

make browser : start firefox in box and test container (requires XQuartz on Mac and Cywin/X on Windows)

make stop : stop docker container

make delete : stop and remove container

make nsenter : open shell inside container

All docker relevant files are in /vagrant/koha, so building an image manually inside the vagrant box (do vagrant ssh first) is done by sudo docker build -t kohaimage /vagrant/koha

About

Koha docker image builders

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 52.9%
  • Shell 25.4%
  • Makefile 11.7%
  • Perl 7.5%
  • Go 2.3%
  • Gherkin 0.2%