If you wish to run DSpace on Docker in production, we recommend building your own Docker images. You are welcome to borrow ideas/concepts from the below images in doing so. But, the below images should not be used "as is" in any production scenario.
The Dockerfiles in this directory (and subdirectories) are used by our Docker Compose scripts.
This Dockerfile is used to pre-cache Maven dependency downloads that will be used in subsequent DSpace docker builds. Caching these Maven dependencies provides a speed increase to all later builds by ensuring the dependencies are only downloaded once.
docker build -t dspace/dspace-dependencies:latest -f Dockerfile.dependencies .
This image is built automatically after each commit is made to the main branch.
Admins to our DockerHub repo can manually publish with the following command.
docker push dspace/dspace-dependencies:latest
This Dockerfile builds a DSpace REST API backend image (for testing/development). This image deploys one webapp to Tomcat running in Docker:
- The DSpace REST API (at
http://localhost:8080/server) This image also sets up debugging in Tomcat for development.
docker build -t dspace/dspace:latest-test -f Dockerfile.test .
This image is built automatically after each commit is made to the main branch.
Admins to our DockerHub repo can manually publish with the following command.
docker push dspace/dspace:latest-test
This Dockerfile builds a DSpace REST API backend image. This image deploys one DSpace webapp to Tomcat running in Docker:
- The DSpace REST API (at
http://localhost:8080/server)
docker build -t dspace/dspace:latest -f Dockerfile .
This image is built automatically after each commit is made to the main branch.
Admins to our DockerHub repo can publish with the following command.
docker push dspace/dspace:latest
This Dockerfile builds a DSpace CLI (command line interface) image, which can be used to run DSpace's commandline tools via Docker.
docker build -t dspace/dspace-cli:latest -f Dockerfile.cli .
This image is built automatically after each commit is made to the main branch.
Admins to our DockerHub repo can publish with the following command.
docker push dspace/dspace-cli:latest
This is a PostgreSQL Docker image (based off the Official Postgres image) which also contains curl.
The image is pre-configured to load a Postgres database dump on initialization. Therefore, its primarily usage is for
database restoration from a SQL file dump / backup. It is not necessary to use this image for a DSpace Docker
installation.
This image is built automatically after each commit is made to the main branch.
How to build manually:
cd dspace/src/main/docker/dspace-postgres-loadsql
docker build -t dspace/dspace-postgres-loadsql:latest .
It is also possible to change the version of PostgreSQL or the PostgreSQL user's password during the build:
cd dspace/src/main/docker/dspace-postgres-loadsql
docker build -t dspace/dspace-postgres-loadsql:latest --build-arg POSTGRES_VERSION=17 --build-arg POSTGRES_PASSWORD=mypass .
Admins to our DockerHub repo can (manually) publish with the following command.
docker push dspace/dspace-postgres-loadsql:latest
This is a test / demo image which provides an Apache HTTPD proxy (in front of Tomcat)
with mod_shib & Shibboleth installed based on the
DSpace Shibboleth configuration instructions.
It is primarily for usage for testing DSpace's Shibboleth integration.
It uses https://samltest.id/ as the Shibboleth IDP
This image is built manually. It should be rebuilt as needed.
cd dspace/src/main/docker/dspace-shibboleth
docker build -t dspace/dspace-shibboleth .
# Test running it manually
docker run -i -t -d -p 80:80 -p 443:443 dspace/dspace-shibboleth
This image can also be rebuilt using the ../docker-compose/docker-compose-shibboleth.yml script.
This Dockerfile builds a Solr image with DSpace Solr configsets included. It can be pulled / built following the docker compose resources documentation. Or, to just build and/or run Solr:
docker compose build dspacesolr
docker compose -p d8 up -d dspacesolrIf you're making iterative changes to the DSpace Solr configsets you'll need to rebuild /
restart the dspacesolr container for the changes to be deployed. From DSpace root:
docker compose -p d8 up --detach --build dspacesolrThese resources are bundled into the dspace/dspace:dspace-*-test image at build time.
See the Dockerfile.test section above for more information about the test image.
When updating or debugging Docker image builds, it can be useful to briefly spin up an "intermediate container". Here's how to do that:
# First find the intermediate container/image ID in your commandline logs
docker run -i -t [container-id] /bin/bash