Versions Compared

Key

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

This project comes from Innovation Week March 2018. Code can be found at https://github.com/csrster/docker-csr

...

As base it uses an ubuntu image with preinstalled Java 8. I copy NetarchiveSuite 5.2.2 into the image and install the jinja2 command line (j2cli). Then comes a little bit of unpacking and renaming of some NetarchiveSuite files. I expose port 8078. Actually this is really only necessary for the GUI and ViewerProxy applications. Finally I define the command to be run by the container when it is started - docker-entrypoint.sh. What does this script actually do? 

Info
#!/bin/bash -e
# Adapted from https://github.com/tryolabs/nginx-docker/blob/master/docker-entrypoint.sh
for f in $(find /nas -type f -name "*.j2"); do
echo -e "Evaluating template\n\tSource: $f\n\tDest: ${f%.j2}"
j2 $f > ${f%.j2}
rm -f $f
done
chmod 755 /nas/start.sh
/nas/start.sh

...

The full docker-compose.yml file contains all the necessary applications to create a fully-functional containerised NetarchiveSuite instance.

Image Added

Note that the macnine names are the values container Id's supplied by docker, which is what the JVM sees as its hostname. Not especially useful!

What Else?


One advantage of using something standardised like Docker/-Compose is that you can leverage standardised tools. For example the Rancher tool provides a dashboard for all your Docker containers, and has support for deploying docker-compose builds to multiple hosts (supposedly - I didn't test it). Some screenshots

...