{"id":40115891,"url":"https://github.com/dlcs/image-server-node-cantaloupe","last_synced_at":"2026-01-19T12:10:08.467Z","repository":{"id":38349091,"uuid":"498001569","full_name":"dlcs/image-server-node-cantaloupe","owner":"dlcs","description":"Dockerfile for Cantaloupe image server","archived":false,"fork":false,"pushed_at":"2024-07-29T15:18:19.000Z","size":463,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-07-30T13:16:46.212Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlcs.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-30T15:35:03.000Z","updated_at":"2024-07-30T13:16:46.213Z","dependencies_parsed_at":"2024-07-29T12:53:54.400Z","dependency_job_id":null,"html_url":"https://github.com/dlcs/image-server-node-cantaloupe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dlcs/image-server-node-cantaloupe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlcs%2Fimage-server-node-cantaloupe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlcs%2Fimage-server-node-cantaloupe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlcs%2Fimage-server-node-cantaloupe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlcs%2Fimage-server-node-cantaloupe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlcs","download_url":"https://codeload.github.com/dlcs/image-server-node-cantaloupe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlcs%2Fimage-server-node-cantaloupe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28567863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T08:53:44.001Z","status":"ssl_error","status_checked_at":"2026-01-19T08:52:40.245Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-19T12:10:05.792Z","updated_at":"2026-01-19T12:10:08.458Z","avatar_url":"https://github.com/dlcs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image Server Cantaloupe\n\nA single Docker file that builds and runs [Cantaloupe](https://cantaloupe-project.github.io/) image server.\n\n## Configuration\n\nThere are 3 different commands for running:\n\n### Default\n\nThe default command runs Cantaloupe using [cantaloupe.properties.sample](cantaloupe.properties.sample).\n\nThis sample file is copied from the Cantaloupe repo with the following changes:\n\n```ini\n# Use ManualSelectionStrategy as AutomaticSelectionStrategy will always try and use Kakadu, \n# see Cantaloupe https://github.com/cantaloupe-project/cantaloupe/issues/559\nprocessor.selection_strategy = ManualSelectionStrategy\n\n# Use GrokProcessor for handling jp2 files\nprocessor.ManualSelectionStrategy.jp2 = GrokProcessor\n```\n\n\u003e Grok is favoured over OpenJpeg as the latter isn't correctly handling ICC profiles\n\n### S3 Sourced Properties\n\nSet `PROPERTIES_LOCATION` env var to a valid S3 location containing a cantaloupe properties file and use `/opt/app/s3-config.sh` command. This will download the properties file and launch cantaloupe using it.\n\n### Kakadu Native Processor\n\nSet `KAKADU_LOCATION` env var to a valid S3 location containing Kakadu binaries and `KAKADU_VERSION` to the version of Kakadu being used. Use `/opt/app/kakadu.sh` command. \n\nThis will download and extract the Kakadu binaries to appropriate location for cantaloupe.\n\nAlso need to set `PROPERTIES_LOCATION` as above as it's expected that config will be loaded from S3.\n\n\u003e Remember to set `AutomaticSelectionStrategy` to use Kakadu, see (default)[#default] above.\n\n#### Kakadu Archive\n\nIt's expected that the Kakadu archive is a `tar.gz` with the following structure:\n\n```\nkakadu-\u003cversion\u003e/\n  lib/\n  bin/\n  \u003cetc\u003e/\njava/\n  kdu_jni/\n  kdu_jni.jar\n```\n\n### Handling Multiple S3 bucket sources\n\nWhen using an [S3Source](https://cantaloupe-project.github.io/manual/5.0/sources.html#S3Source) a single bucket is supported via the `S3Source.BasicLookupStrategy.bucket.name` property.\n\nTo support multiple buckets, the included `delegates.rb` file handles the `s3source_object_info` delegate. This parses the incoming identifier and pulls bucket and key from it. It handles the following formats:\n\n* `s3://{region}/{bucket}/{key}`\n* `s3://{bucket}/{key}`\n\nA sample request would then be: `http://cantaloupe/iiif/3/s3:%2f%2fmy-bucket%2f2my-key/full/max/0/default.jpg`.\n\n```ini\ndelegate_script.enabled = true\nsource.static = S3Source\nS3Source.lookup_strategy = ScriptLookupStrategy\n```\n\n## Running Locally\n\nThe dockerfile can be run locally, or run via the sample docker-compose file.\n\nThis runs on port 8182 and by default will look in `/home/cantaloupe/images/` for image sources.\n\n```bash\n# build docker file\ndocker build -t dlcs-cantaloupe:local .\n\n# run docker file, enabling /admin\ndocker run --rm -it -p 8182:8182 \\\n    -e ENDPOINT_ADMIN_ENABLED=true \\\n    -e ENDPOINT_ADMIN_SECRET=admin \\\n    -v path/to/images:/home/cantaloupe/images/ \\\n    --name dlcs-cantaloupe \\\n    dlcs-cantaloupe:local\n\n# use cantaloupe properties file stored in s3\ndocker run --rm -it -p 8182:8182 \\\n    -e ENDPOINT_ADMIN_ENABLED=true \\\n    -e ENDPOINT_ADMIN_SECRET=admin \\\n    -e PROPERTIES_LOCATION=s3://my-bucket-name/cantaloupe.properties.s3 \\\n    -v path/to/images:/home/cantaloupe/images/ \\\n    --name dlcs-cantaloupe \\\n    dlcs-cantaloupe:local \\\n    /opt/app/s3-config.sh\n\n# use cantaloupe properties file stored in s3 and Kakadu binaries\ndocker run --rm -it -p 8182:8182 \\\n    -e ENDPOINT_ADMIN_ENABLED=true \\\n    -e ENDPOINT_ADMIN_SECRET=admin \\\n    -e PROPERTIES_LOCATION=s3://my-bucket-name/cantaloupe.properties.s3 \\\n    -e KAKADU_LOCATION=s3://my-bucket-name/kakadu-8.2.1.tar.gz \\\n    -e KAKADU_VERSION=8.2.1 \\\n    -v path/to/images:/home/cantaloupe/images/ \\\n    --name dlcs-cantaloupe \\\n    dlcs-cantaloupe:local \\\n    /opt/app/kakadu.sh\n\n# run as \"special-server\" using S3Source\ndocker run --rm -it -p 8182:8182 \\\n    -e ENDPOINT_ADMIN_ENABLED=true \\\n    -e ENDPOINT_ADMIN_SECRET=admin \\\n    -e DELEGATE_SCRIPT_ENABLED=true \\\n    -e SOURCE_STATIC=S3Source \\\n    -e S3SOURCE_LOOKUP_STRATEGY=ScriptLookupStrategy \\\n    --name dlcs-cantaloupe \\\n    dlcs-cantaloupe:local\n```\n\nAlternatively there's a docker compose file to run, copy `.env.dist` -\u003e `.env` and alter as required.\n\n```bash\n# Run docker-compose\ndocker compose up\n```\n\n## Processors\n\nBy default it will run with Cantaloupe running the following [processors](https://cantaloupe-project.github.io/manual/5.0/processors.html):\n\n* Ffmpeg\n* Grok (v12.0.3)\n* Jai\n* Java2d\n* OpenJpeg (v2.5.2)\n* PdfBox\n* TurboJpeg\n\n### Kakadu\n\nKakadu native processor is supported by providing path to Kakadu (see [above](#kakadu-native-processor))\n\n### Dependencies\n\nlibjpeg dep is copied from the official [cantaloupe repo](https://github.com/cantaloupe-project/cantaloupe/tree/develop/docker/Linux-JDK11/image_files/libjpeg-turbo/lib64).\n\n## Java Memory \n\nThe initial heap and maximum heap size are defaulted to initial 256MB/max 2GB in the Dockerfile.\n\nThese can be overridden by specifying the following envvars (see https://cantaloupe-project.github.io/manual/5.0/deployment.html#MemoryHeapMemory):\n\n* MAXHEAP - Value for `-Xmx` Java arg.\n* INITHEAP - Value for `-Xms` Java arg.\n\ne.g.\n\n```bash\ndocker run --rm -it -p 8182:8182 \\\n    -e ENDPOINT_ADMIN_ENABLED=true \\\n    -e ENDPOINT_ADMIN_SECRET=admin \\\n    -e MAXHEAP=5g \\\n    -e INITHEAP=3g \\\n    -v path/to/images:/home/cantaloupe/images/ \\\n    --name dlcs-cantaloupe \\\n    dlcs-cantaloupe:local\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlcs%2Fimage-server-node-cantaloupe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlcs%2Fimage-server-node-cantaloupe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlcs%2Fimage-server-node-cantaloupe/lists"}