Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleContent has moved

See https://github.com/DSpace-Labs/DSpace-Docker-Images/blob/master/README.md


Table of Contents

The following notes describe my experimentation building and running DSpace 6 within Docker on my Mac.

...

Code Block
titleLaunching tomcat within Docker
docker run -it --rm -d -v ~/dspace:/dspace -v ~/dspace/webapps:/usr/local/tomcat/webapps --link dspacedbhost:dspacedbhost -p 8080:8080 tomcat8tomcat:8.0


Open a web browser

After the initialization is complete, open http://localhost:8080/xmlui to view DSpace.

Simple Config - running maven and ant on desktop (MacOS)

Setup - local.cfg

  • Create /installs/dspace locally
  • Do not change db.url

Docker Commands

Code Block
titleStart postgres in Docker
docker run -it --rm -d -p 5432:5432 --name dspacedbhost terrywbrady/dspacedb 
docker run -it --rm -v ~/dspace:/dspace -v ~/dspace/webapps:/usr/local/tomcat/webapps -p 8080:8080 tomcat:8.0


Simple Config - running maven and ant on desktop (Windows10)

The DSpace ant build needs to run on the machine where the install will take place.  Therefore, the ant build should run in a Docker image that runs on the same Docker network

  • Before cloning the repo on Windows
    • git config --global core.autocrlf false

    • git config --global core.eol lf

  • DSpace Branch: dspace-6_x
  • local.cfg
  • dspace-src:
    • desktop: c:\Users\[user]\Documents\GitHub\DSpace
  • dspace-install: 
    • desktop: c:\installs\dspace
    • docker image: /dspace


Code Block
docker network create dspacenet

docker volume create pgdataD6

docker run -it -d --network dspacenet -p 5432:5432 --name dspacedbhost -v pgdataD6:/var/lib/postgresql/data terrywbrady/dspacedb

docker volume create dspaceD6

docker run -it --rm --network dspacenet -v ${PWD}/dspace/target/dspace-installer:/installer -v dspaceD6:/dspace -w /installer terrywbrady/dspace-docker-ant ant update clean_backups

docker run -it --rm --network dspacenet -v dspaceD6:/dspace -v dspaceD6/dspace/webapps/solr:/usr/local/tomcat/webapps/solr:ro -v dspaceD6/dspace/webapps/xmlui:/usr/local/tomcat/webapps/xmlui:ro -p 8080:8080 -e JAVA_OPTS=-Xmx2000m --name dspacetomcat tomcat:8

docker run -it --rm --network dspacenet -v dspaceD6:/dspace -p 8080:8080 -e JAVA_OPTS=-Xmx2000m --name dspacetomcat tomcat:8


docker exec -it --detach-keys "ctrl-p" dspacetomcat /bin/bash

docker exec -it --detach-keys "ctrl-p" dspacedbhost psql -U dspace