diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000..a36c501 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +# NAME ibm/spectrumprotect-oc +# VERSION 8.1.1 +# BUILD docker build -t="leenooks/spectrumprotect-oc" . + +FROM centos:7 + +# OS Installation Prerequisites +RUN yum -y install http://yum.leenooks.net/CentOS/7/base/redhat-release-7-6.el7.centos.12.2.x86_64.rpm libaio ksh compat-libstdc++-33 numactl && yum clean all && rm -rf /var/tmp/* + +COPY install-oc.xml /tmp/ + +# Installation +RUN SOURCE_URL=http://YOUR_SITE_URL_HERE && \ + mkdir -p /tmp/build && cd /tmp/build && \ + curl -SL ${SOURCE_URL}/8.1.1 > tsm && \ + chmod +x tsm && ./tsm && rm -f tsm && \ + ./install.sh -s -input /tmp/install-oc.xml -acceptLicense && \ + rm -rf /tmp/build /tmp/install*xml + +COPY init /sbin/ + +# Our final docker parameters +EXPOSE 11443 +ENTRYPOINT [ "/sbin/init" ] +CMD [ "start" ] diff --git a/init b/init new file mode 100755 index 0000000..624a594 --- /dev/null +++ b/init @@ -0,0 +1,21 @@ +#!/bin/bash +set -e + +NAME="SP" + +function stop { + echo "Stopping ${NAME}" + /opt/tivoli/tsm/ui/Liberty/bin/opscenter.rc stop +} + +trap 'stop' SIGTERM + +if [ "$1" == "start" ]; then + /opt/tivoli/tsm/ui/Liberty/bin/opscenter.rc start + + ( while ps -p $(cat /opt/tivoli/tsm/ui/Liberty/usr/servers/.pid/guiServer.pid) >/dev/null; do sleep 600; done ) & + + wait +else + exec $@ +fi diff --git a/install-oc.xml b/install-oc.xml new file mode 100755 index 0000000..81a904a --- /dev/null +++ b/install-oc.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +