If you wish to run DSpace-CRIS 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-CRIS 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 4science/dspace-cris-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 4science/dspace-cris-dependencies:latest
This Dockerfile builds a DSpace-CRIS REST API backend image (for testing/development). This image deploys one webapp to Tomcat running in Docker:
- The DSpace-CRIS REST API (at
http://localhost:8080/server) This image also sets up debugging in Tomcat for development.
docker build -t 4science/dspace-cris: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 4science/dspace-cris:latest-test
This Dockerfile builds a DSpace-CRIS REST API backend image. This image deploys one DSpace-CRIS webapp to Tomcat running in Docker:
- The DSpace-CRIS REST API (at
http://localhost:8080/server)
docker build -t 4science/dspace-cris: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 4science/dspace-cris:latest
This Dockerfile builds a DSpace-CRIS CLI (command line interface) image, which can be used to run DSpace's commandline tools via Docker.
docker build -t 4science/dspace-cris-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 4science/dspace-cris-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 4science/dspace-cris-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 4science/dspace-cris-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 4science/dspace-cris-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 4science/dspace-cris-shibboleth .
# Test running it manually
docker run -i -t -d -p 80:80 -p 443:443 4science/dspace-cris-shibboleth
This image can also be rebuilt using the ../docker-compose/docker-compose-shibboleth.yml script.
This Dockerfile builds a Solr image with DSpace-CRIS Solr configsets included. It can be pulled / built following the docker compose resources documentation. You can build and push the image using the following commands:
docker build -t 4science/dspace-cris-solr:latest -f src/main/docker/dspace-solr/Dockerfile .
docker push 4science/dspace-cris-solr:latestYou can then run it using the docker-compose file:
docker compose -p dcris25 up -d dspacesolrAlternatively, you can use the docker compose tool directly to just build and/or run Solr:
docker compose build dspacesolr
docker compose -p dcris25 up -d dspacesolrIf you're making iterative changes to the DSpace-CRIS Solr configsets you'll need to rebuild /
restart the dspacesolr container for the changes to be deployed. From DSpace-CRIS root:
docker compose -p dcris25 up --detach --build dspacesolrThese resources are bundled into the 4science/dspace-cris: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