Running DSpace inside docker containers can be tricky. This image helps you run each webapp in separate containers.
In fact, you can decide which app you want to install; therefore you can still run each of them in the same container.
There are some currently supported applications, however, you are not limited to install only those.
Supported applications are:
oai
rest
solr
swordv2
xmlui
To build your own tomcat image, create a Dockerfile
FROM itsziget/dspace/dspace-builder:v1.0.0-rc.1 as builder
FROM itsziget/dspace/dspace-tomcat:v1.0.0-rc.1
and place the custom sourcecode into "srcCustom".
You can use the images from Docker Hub of course.
NOTE: "as builder" is important at the and of the first line. The second stage will copy the built files from the "builder" stage.
This way you can use any compatible builder and tomcat images.
APP_NAME: (default: "xmlui") It must have the same value as it was in the builder. It informs the tomcat builder and the running container's scripts which applications it needs to deal with. When you run the the container, those scripts try to modify only the installed applications' configurations based on the environment variables.
APP_ROOT: (default: "xmlui") It must contain only one application's name. It will be renamed to "ROOT" to make it web root.
There are environment variables to customize configurations like database connection and URL-s:
DS_PORT: (default: 8080) Public port of the XMLUI webinterface.
DS_DB_HOST: (default: "db") The host of the postgresql database server
DS_DB_PORT: (default: 5432) The port of the postgresql database server
DS_DB_SERVICE_NAME: (default: "dspace") The name of the postgresql database
DS_LOGLEVEL_OTHER: (default: "WARN") Value of loglevel.other in log4j.properties
DS_LOGLEVEL_DSPACE: (default: "WARN") Value of loglevel.dspace in log4j.properties
DS_PROTOCOL: (default: "http") Protocol of the XMLUI. https or http
DS_SOLR_HOSTNAME: (default: "solr") Internal hostname of solr server. It will always use http protocol.
DS_SOLR_ALLOW_REMOTE: (default: "false") If it is "true" solr can be accessible from anywhere. In this case you should use an external firewall/proxy to deny untrusted clients to connect.
DS_CUSTOM_CONFIG: (default: "") It is a multiline string for custom configurations that you could use in dspace.cfg
DS_REST_FORCE_SSL: (default: "true") The rest API requires secure connection by default. Using containers it can be unnecessary behind a secure proxy. You can turn it off by setting it to "false"
DS_REDIS_SESSION: (default: true) During an upgrade, you would lose all of the sessions without an external session database. However, if you do not wish to use Redis, you can turn it off by setting the variable to "false". Currently, the redis server must be accessible as "redis". Docker lets you map custom hostnames to IP addresses. See docker run for more information.
Any configuration directive can be set using environment variables prefixed by "config.".