opencast / opencast-docker

Dockerfiles for Opencast
https://quay.io/organization/opencast/
Educational Community License v2.0
41 stars 36 forks source link
docker-images hacktoberfest opencast video-processing

Opencast container images

Build Status

Introduction

This repository holds Dockerfiles for creating Opencast container images.

Installation

All images are available on Quay. To install the image simply pull the distribution you want:

$ docker pull "quay.io/opencast/<distribution>"

To install a specific version, use the following command:

$ docker pull "quay.io/opencast/<distribution>:<version>"

Build

If you want to build the images yourself, there is a Makefile with the necessary docker build commands for all distributions. Running make in the root directory will create these images. To customize the build you can override these variables:

Quick Start

A quick local test system can be started using docker compose. After cloning this repository you can run this command from the root directory:

$ docker compose -p opencast-allinone -f docker-compose/docker-compose.allinone.h2.yml up

This will run Opencast using the allinone distribution configured to use the bundled H2 Database Engine.

In the ./docker-compose directory there are also compose files for more production-like setups. docker-compose.allinone.mariadb.yml and docker-compose.allinone.postgresql.yml uses the MariaDB and PostgreSQL databases, respectively, while docker-compose.multiserver.mariadb.yml and docker-compose.multiserver.postgresql.yml demonstrate how to connect the different distributions. Replace the compose file in the command above if you want to use them instead. You can find more information about the compose files here.

Images

Opencast comes in different distributions. For each of the official distributions, there is a specific container image. Each version is tagged. For example, the full image name containing the admin distribution at version 16.5 is quay.io/opencast/admin:16.5. Leaving the version out will install the latest one.

allinone

This image contains all Opencast modules necessary to run a full Opencast installation. It's useful for small and local test setups. If you, however, want to run Opencast in a distributed fashion, you probably should use a combination of admin, worker and presentation containers.

admin, adminpresentation, ingest, presentation and worker,

These images contain the Opencast modules of the corresponding Opencast distributions.

build

This image helps you set up a development environment for Opencast:

$ export OPENCAST_SRC=</path/to/my/opencast/code>
$ export OPENCAST_BUILD_USER_UID=$(id -u)
$ export OPENCAST_BUILD_USER_GID=$(id -g)

$ docker compose -p opencast-build -f docker-compose/docker-compose.build.yml up -d
$ docker compose -p opencast-build -f docker-compose/docker-compose.build.yml exec --user opencast-builder opencast bash

After attaching you can press enter to force the shell to output a prompt.

Starting with 2.2.2 there will be a build image for every release of Opencast. It will know how to build this specific version within the container. While you can use git to check out different versions of Opencast, we recommend that with it you then also change the version of the build container.

Usage

The images come with multiple commands. You can see a full list with description by running:

$ docker run --rm quay.io/opencast/<distribution> app:help
Usage:
  app:help         Prints the usage information
  app:init         Checks and configures Opencast but does not run it
  app:start        Starts Opencast
  [cmd] [args...]  Runs [cmd] with given arguments

Configuration

It's recommended to configure Opencast by using Docker Volumes:

$ docker run -v "/path/to/opencast-etc:/etc/opencast" quay.io/opencast/<distribution>

The most important settings, however, can be configured by environment variables. You can use this functionally to generate new configuration files. For this start a new container with specific variables and execute the app:init command. This will ensure you haven't missed anything, write the configuration files and exit. Then you can copy the files to a target directory:

$ docker run --name opencast_generate_config \
  -e "ORG_OPENCASTPROJECT_SERVER_URL=http://localhost:8080" \
  -e "ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER=admin" \
  -e "ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS=opencast" \
  -e "ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER=opencast_system_account" \
  -e "ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS=CHANGE_ME" \
  quay.io/opencast/<distribution> "app:init"
$ docker cp opencast_generate_config:/opencast/etc opencast-config
$ docker rm opencast_generate_config

Make sure to use the correct Opencast distribution as there are small differences.

Opencast

For an installation with multiple nodes you can also set:

Elasticsearch

Database

H2

There are no additional environment variables you can set if you are using the H2 database.

MariaDB and PostgreSQL

whisper.cpp

Miscellaneous

Data

The data directory is located at /data. Use Docker Volumes to mount this directory on your host.

Languages

Opencast makes use of Tesseract to recognize text in videos (ORC). For this, training data files are needed. These images come with files for the English language. If you need other or more languages you can extend these images or use Docker Volumes to mount them in the appropriate directories /usr/share/tessdata.

References