Sign inSign up

exlibrisgroup/alma-cantaloupe

By exlibrisgroup

•Updated over 7 years ago

Alma Cantaloupe

Image
0

6.2K

exlibrisgroup/alma-cantaloupe repository overview

⁠Alma Cantaloupe Image Server

A docker build of the Canteloupe Image Server⁠ with a custom script resolver for digital resources managed in Ex Libris Alma⁠.

Docker hub repository available at https://hub.docker.com/r/exlibrisgroup/alma-cantaloupe/⁠.

The docker image was based on input from the example in this fork⁠ and the Loris docker repository⁠ (for the OpenJPEG installation).

⁠Docker Image

The docker image is based on the following components:

⁠Alma Resolver

This repository includes a custom delegate script for the FilesystemResolver. It implementsthe following logic:

  • Receives a JWT token⁠ as the identifier
    • The token is RS256 signed with an Alma private key and validated with with the public key in keyfile-pub.pem.
    • The payload includes the following properties:
    {
        "region": region,
        "bucket": bucket,
        "key": filename
    }
  • If the file is not in cache it is downloaded from the Alma S3 storage

⁠AWS Deployment

The docker image is deployed to an AWS Elastic Beanstalk application using the configuration in Dockerrun.aws.json.

⁠Usage

⁠Pull the image from docker
$ docker pull exlibrisgroup/alma-cantaloupe
⁠Run the image in development

Because the resolver requires AWS credentials, we mount the current user's home directory as the cantaloupe user's home in the container:

$ docker run -d --rm -p 8182:8182 -v ~/.aws:/home/.aws --name cantaloupe exlibrisgroup/alma-cantaloupe

The credentials file must be readable by the cantaloupe user. So the file permissions must be changed on the host:

$ chmod o+r ~/.aws/*
⁠Connect to a running container
$ docker exec -i -t --user root cantaloupe /bin/bash

Use Cntrl-P, Cntrl-Q to leave running.

⁠Build the container
$ git clone https://github.com/ExLibrisGroup/alma-cantaloupe.git
$ cd alma-cantaloupe
$ docker build -t exlibrisgroup/alma-cantaloupe .

Tag summary

Content type

Image

Digest

Size

413 MB

Last updated

over 7 years ago

docker pull exlibrisgroup/alma-cantaloupe