Install Docker. For example, if you are on Ubuntu, follow the instructions [here|https://docs.docker.com/install/linux/docker-ce/ubuntu/].
Consider enabling the ability to run docker commands without sudo:
sudo usermod -aG docker $USER
Check your version of Docker (The install and build images have been tested with Docker 18.06.1-ce
):
docker --version
Starting with an installer zip (output from Dockerfile-build
), it installs openEQUELLA and is ready to run the application. When the container starts, it keys off of configurable properties such as DB host/name/username/password, admin url, etc.
Meant for automated builds of openEQUELLA, but can be used as a quickstart to use openEQUELLA (not vetted for production use yet).
Note - the zip and the root directory in the zip are not always the same, hence the different env variables.
$ cd docker
$ docker build -t apereo/oeq-install-VER . --build-arg OEQ_INSTALL_FILE=equella-installer-VER.zip --build-arg OEQ_INSTALL_ZIP_ROOT_DIR=equella-installer-VER
$ docker run -t --name oeq -e EQ_HTTP_PORT=8080 -e EQ_ADMIN_URL=http://172.17.0.2:8080/admin/ -e EQ_HIBERNATE_CONNECTION_URL=jdbc:postgresql://your-db-host-here:5432/eqdocker -e EQ_HIBERNATE_CONNECTION_USERNAME=equellauser -e EQ_HIBERNATE_CONNECTION_PASSWORD="your-db-pw-here" oeq-install-VER
To access the terminal of the container:
docker exec -it oeq /bin/bash
Pulls the latest Equella repo, and sets up the environment and helper scripts to build and save the openEQUELLA installer and upgrader.
$ cd docker/docker-build
$ docker build -t apereo/oeq-builder -f Dockerfile-oraclejdk .
$ docker run -it --name oeqbuilder -v /home/user/temp/oeqbuilder-ws:/artifacts apereo/oeq-builder
Build the upgrader and save it to the host directory
cd /home/equella
sh build-upgrader.sh
sh move-upgrader-to-host.sh
Separately, you can also build the upgrader and save it to the host directory
cd /home/equella
sh build-installer.sh
sh move-installer-to-host.sh
cd ~/repo/Equella
rm -r Source/Plugins/Kaltura
git reset --hard
git checkout master
cd ../Equella-Kaltura
git reset --hard
git checkout master
Not specifically a Docker issue, but when running SBT, if you hit the error below, in the Docker container, run cd ~/repo/Equella ; find . -name target -exec rm -r "{}" \; ; cd ~
and retry the SBT command. Solution found on sbt/sbt#3050.
Loading project definition from /home/equella/repo/Equella/project
Error wrapping InputStream in GZIPInputStream: java.util.zip.ZipException: Not in GZIP format
at sbt.ErrorHandling$.translate(ErrorHandling.scala:10)
...
Using an apereo/oeq-builder
image and a Java keystore (keystore.jks), invoke docker run
with an additional host directory -v /directory/location/of/java/keystore:/non-default-keystore
. There are several options on how to create and populate the build.conf. Without installing editors onto the docker image, you can add a build.conf
with the following contents into your host directory containing the keystore, and then in the container, run cp /non-default-keystore/build.conf /home/equella/repo/Equella/project
.
signer {
keystore = "/non-default-keystore/keystore.jks"
storePassword = "<storepasswd>"
keyPassword = "<optional>" # defaults to storePassword
alias = "<keyalias>"
}
See https://github.com/equella/Equella#keystore for more details.
It would be helpful to have a flag for the default Dockerfile to place the filestore on a host directory.
It would be helpful to have a pre-installed openEQUELLA image of each major version get pushed to DockerHub under Apereo, as well as aim for a Production ready Docker image.