summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Lundberg <lundberg@nordu.net>2015-02-13 17:44:59 +0100
committerJohan Lundberg <lundberg@nordu.net>2015-02-13 17:44:59 +0100
commita865ae975c75b1ce321c4e56c9fbd0625623c4a7 (patch)
tree2884b3e48f44cad826586b3c884d537d087c3f46
init
-rw-r--r--.dockerignore4
-rw-r--r--.gitignore1
-rw-r--r--Dockerfile33
-rw-r--r--edit-webapp/.placeholder0
-rw-r--r--start.sh21
5 files changed, 59 insertions, 0 deletions
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..5cf8dae
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,4 @@
+.git
+conf
+credentials
+edit-webapp
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..454b655
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+credentials
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..74be2e3
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,33 @@
+FROM dockerfile/java:oracle-java7
+MAINTAINER Johan Lundberg <lundberg@nordu.net>
+
+# Install packages
+RUN apt-get update && \
+ apt-get update --fix-missing && \
+ apt-get install -y wget
+
+# Download and install jetty
+ENV JETTY_VERSION 9.2.7
+ENV RELEASE_DATE v20150116
+RUN wget http://download.eclipse.org/jetty/stable-9/dist/jetty-distribution-${JETTY_VERSION}.${RELEASE_DATE}.tar.gz && \
+ tar -xzvf jetty-distribution-${JETTY_VERSION}.${RELEASE_DATE}.tar.gz && \
+ rm -rf jetty-distribution-${JETTY_VERSION}.${RELEASE_DATE}.tar.gz && \
+ mv jetty-distribution-${JETTY_VERSION}.${RELEASE_DATE}/ /opt/jetty
+
+# Configure Jetty user and clean up install
+RUN useradd jetty && \
+ chown -R jetty:jetty /opt/jetty && \
+ rm -rf /opt/jetty/webapps.demo
+
+# Download shibboleth-idp
+ENV IDP_VERSION 3.0.0
+RUN wget https://shibboleth.net/downloads/identity-provider/${IDP_VERSION}/shibboleth-identity-provider-${IDP_VERSION}.tar.gz && \
+ tar -xzvf shibboleth-identity-provider-${IDP_VERSION}.tar.gz && \
+ rm -rf shibboleth-identity-provider-${IDP_VERSION}.tar.gz && \
+ mv shibboleth-identity-provider-${IDP_VERSION} /opt/shibboleth-identity-provider-${IDP_VERSION}
+
+ADD start.sh /start.sh
+RUN chmod a+x /start.sh
+# Set defaults for docker run
+ENTRYPOINT ["/start.sh"]
+CMD ["start"]
diff --git a/edit-webapp/.placeholder b/edit-webapp/.placeholder
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/edit-webapp/.placeholder
diff --git a/start.sh b/start.sh
new file mode 100644
index 0000000..3b48694
--- /dev/null
+++ b/start.sh
@@ -0,0 +1,21 @@
+#!/bin/sh -x
+
+# shibboleth-identity-provider source dir
+cd /opt/shibboleth-identity-provider-${IDP_VERSION}
+
+case "$*" in
+ start)
+ # Upgrade/Recreate war
+ ./bin/install.sh -Didp.src.dir /opt/shibboleth-identity-provider-${IDP_VERSION}/ -Didp.target.dir /opt/shibboleth-idp
+ ;;
+ install)
+# Fresh install
+cat>/tmp/entity_id<<EOF
+idp.entityID= ${ENTITY_ID}
+EOF
+ ./bin/install.sh -Didp.src.dir /opt/shibboleth-identity-provider-${IDP_VERSION}/ -Didp.target.dir /opt/shibboleth-idp -Didp.host.name ${HOSTNAME} -Didp.scope ${SCOPE} -Didp.sealer.password ${COOKIE_PASSWORD} -Didp.keystore.password ${TLS_PASSWORD} -Didp.merge.properties /tmp/entity_id -Didp.noprompt
+ ;;
+ debug)
+ /bin/bash
+ ;;
+esac