Omeka S docker image based on Alpine Linux
10K+
A lightweight and secure Omeka S setup for Docker, built on Alpine Linux. This image is optimized for performance and size, making it an ideal choice for development and production environments.
Repository: https://github.com/erseco/alpine-omeka-s
erseco/alpine-php-webserver base image for a minimal footprint (+/- 70MB).ondemand process manager to optimize resource usage.nobody). Logs are directed to the container's STDOUT.amd64, arm/v6, arm/v7, arm64, ppc64le, s390x.Here is a minimal docker-compose.yml example to get you started:
---
services:
mariadb:
image: mariadb:lts
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=omeka_s
- MYSQL_DATABASE=omeka_s
- MYSQL_USER=omeka_s
- MYSQL_PASSWORD=omeka_s
volumes:
- mariadb_data:/var/lib/mysql
omeka-s:
image: erseco/alpine-omeka-s:latest
build:
context: .
restart: unless-stopped
ports:
- "8080:8080"
environment:
# Omeka S Installation Details
OMEKA_ADMIN_EMAIL: [email protected]
OMEKA_ADMIN_PASSWORD: PLEASE_CHANGEME
OMEKA_SITE_TITLE: "My Omeka S Site"
# Database Connection
DB_HOST: mariadb
DB_NAME: omeka_s
DB_USER: omeka_s
DB_PASSWORD: omeka_s
volumes:
- omeka_data:/var/www/html/volume
depends_on:
- mariadb
volumes:
mariadb_data: null
omeka_data: null
To start the services, run:
docker compose up
Once the container is running, Omeka S will be installed and accessible at http://localhost:8080.
You can configure the container using the following environment variables in your docker-compose.yml file.
| Argument | Description | Default |
|---|---|---|
OMEKA_VERSION | Omeka S tag to install, or develop for the development branch. | develop |
OMEKA_CLI_VERSION | Omeka-S-CLI release bundled in the image. | 0.14.1 |
Pinning OMEKA_CLI_VERSION keeps image builds reproducible while still allowing explicit CLI upgrades.
| Variable Name | Description | Default |
|---|---|---|
OMEKA_ADMIN_EMAIL | Email for the primary administrator user. | null |
OMEKA_ADMIN_PASSWORD | Password for the administrator. | null |
OMEKA_SITE_TITLE | Public title of the Omeka S site. | null |
OMEKA_ADMIN_NAME | Name of the administrator. | Site Administrator |
OMEKA_TIMEZONE | Installation timezone (e.g., America/New_York). | UTC |
OMEKA_LOCALE | Interface locale for the installation. | en_US |
OMEKA_THEMES | List of theme names | |
OMEKA_MODULES | List of module names | |
OMEKA_CSV_IMPORT_FILE | Path to a CSV file for initial data import. | null |
Note: The Omeka S installation will only run if OMEKA_ADMIN_EMAIL, OMEKA_ADMIN_PASSWORD, and OMEKA_SITE_TITLE are all set.
If you specify the OMEKA_CSV_IMPORT_FILE environment variable, the container will automatically import data from the given CSV file at startup.
Example:
environment:
OMEKA_CSV_IMPORT_FILE: /path/to/your/data.csv
The CSV file should be mounted into the container. For example, you can add this to your docker-compose.yml:
volumes:
- ./my-data.csv:/path/to/your/data.csv
CSV Format Recommendations:
dcterms:title, dcterms:creator, etc., for automatic mapping.| Variable Name | Description | Default |
|---|---|---|
DB_HOST | Database host. | null |
DB_USER | Database user. | null |
DB_PASSWORD | Database password. | null |
DB_NAME | Database name. | null |
DB_PORT | Database port. | 3306 |
| Variable Name | Description | Default |
|---|---|---|
APPLICATION_ENV | Set to development for debug mode and to enable OPcache timestamp validation (development mode). | production |
OPCACHE_ENABLE | Set to 0 to configure OPcache for development mode (enables timestamp validation). Note: OPcache remains enabled, but with development-friendly settings. | 1 (production mode) |
memory_limit | PHP memory limit. | 512M |
upload_max_filesize | Max size for uploaded files. | 128M |
post_max_size | Max size of POST data. | 128M |
client_max_body_size | Nginx max body size for uploads. | 128M |
max_execution_time | PHP max execution time in seconds. | 300 |
| Variable Name | Description | Default |
|---|---|---|
| PRE_CONFIGURE_COMMANDS | Commands to run before starting the configuration | |
| POST_CONFIGURE_COMMANDS | Commands to run after finishing the configuration |
By default, the image uses production-optimized OPcache settings that do not validate file timestamps, which provides maximum performance but prevents code changes from being immediately visible (requires container restart).
For development workflows where you need code changes to be reflected immediately (e.g., when developing Omeka S modules with mounted volumes), you can enable OPcache timestamp validation using either of these methods:
Option 1: Using OPCACHE_ENABLE variable
environment:
OPCACHE_ENABLE: "0" # Configures OPcache for development (enables timestamp validation)
Option 2: Using APPLICATION_ENV variable
environment:
APPLICATION_ENV: development # Auto-enables timestamp validation
When either OPCACHE_ENABLE=0 or APPLICATION_ENV=development is set, the container will configure OPcache to validate file timestamps on every request (opcache.validate_timestamps=1 and opcache.revalidate_freq=0), allowing code changes to be immediately visible without restarting the container.
Production mode (default):
opcache.enable=1opcache.validate_timestamps=0 (no timestamp checking for maximum performance)Development mode:
opcache.enable=1opcache.validate_timestamps=1 (checks files on every request)opcache.revalidate_freq=0 (no delay in revalidation)This image includes the Omeka-S-CLI tool, which simplifies the management of modules and themes. You can automatically install them by providing space-separated names in the OMEKA_MODULES and OMEKA_THEMES environment variables.
Example:
environment:
OMEKA_THEMES: "default"
OMEKA_MODULES: "Common EasyAdmin"
omeka-s-cliFor more advanced tasks, you can use omeka-s-cli directly within the container. This allows you to list, install, uninstall, and manage modules and themes.
Example Commands:
List all installed modules:
docker compose exec omeka-s omeka-s-cli module:list
Install a new theme:
docker compose exec omeka-s omeka-s-cli theme:download foundation
After changing the version, rebuild the image:
docker compose build omeka-s
OMEKA_CSV_IMPORT_FILE)If you set OMEKA_CSV_IMPORT_FILE, the container will import data at startup using the CSVImport module and the bundled import_cli.php. The importer is configured as an upsert:
dcterms:title) already exists, it will be updated.services:
omeka-s:
environment:
# ...
OMEKA_CSV_IMPORT_FILE: /data/sample_data.csv
volumes:
- ./data:/data:ro
The entrypoint ensures the
CSVImportmodule is present and runs the import once on startup. The importer makes a temporary copy of your CSV before dispatching the job, so your original file is not deleted.
, (comma)." (double quote).\ (backslash).Minimum headers supported by the default mapping included in this image:
| Column Name | Required | Purpose |
|---|---|---|
dcterms:title | Yes | Used as the identifier for upsert (update vs create). |
dcterms:creator | No | Creator (example mapping). |
dcterms:description | No | Description (example mapping). |
media_url | No | A direct URL to a media file; ingested with the url ingester. |
Upsert behavior:
updatedcterms:titlecreateIf multiple items share the same title, the module’s default lookup can update the first match. Prefer unique titles for deterministic results.
dcterms:title,dcterms:creator,dcterms:description,media_url
Eiffel Tower,Gustave Eiffel,"A wrought-iron lattice tower in Paris, France.",https://upload.wikimedia.org/wikipedia/commons/a/a8/Tour_Eiffel_Wikimedia_Commons.jpg
Mona Lisa,Leonardo da Vinci,"A portrait painting by the Italian Renaissance artist.",https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/800px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg
Statue of Liberty,Frédéric Auguste Bartholdi,"A neoclassical sculpture on Liberty Island, New York Harbor.",https://upload.wikimedia.org/wikipedia/commons/a/a1/Statue_of_Liberty_7.jpg
Loads Omeka S and the CSVImport module.
Authenticates using the admin configured during installation.
Reads the header row to build the column list.
Applies a built-in mapping:
dcterms:title → property id 1dcterms:creator → property id 2dcterms:description → property id 4media_url → ingester urlDispatches CSVImport\Job\Import with:
action=updateidentifier_property=dcterms:titleaction_unidentified=createrows_by_batch=20If you need to run commands as root inside the container (e.g., to install system packages), use docker compose exec:
docker compose exec --user root omeka-s sh
Content type
Image
Digest
sha256:fb2522317…
Size
91.1 MB
Last updated
3 months ago
docker pull erseco/alpine-omeka-s