From afecfcdcda1f82073012d6828a8ef566bc60a454 Mon Sep 17 00:00:00 2001
From: Dariusz Janny <janny@man.poznan.pl>
Date: Wed, 10 Feb 2021 12:14:11 +0100
Subject: [PATCH] [edugain/faas#33] port exposing added.

---
 Dockerfile          | 4 +++-
 Makefile            | 2 +-
 conf/etc/entrypoint | 3 +++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 510884d..a4356fc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -12,7 +12,7 @@ COPY ./conf/etc/apt/sources.list /etc/apt/sources.list
 
 RUN apt-get -q update && \
     apt-get install -y --no-install-recommends apt-utils && \
-    apt-get install -y --no-install-recommends  curl vim rsyslog && \
+    apt-get install -y --no-install-recommends  curl vim rsyslog mc && \
     apt-get install -y apache2 libapache2-mod-shib shibboleth-sp-utils shibboleth-sp-common  && \
     apt-get --yes install supervisor && \
     apt-get clean
@@ -20,5 +20,7 @@ RUN apt-get -q update && \
 COPY ./conf/etc/supervisord.conf /etc/supervisord.conf
 COPY ./conf/etc/entrypoint /etc/entrypoint
 
+EXPOSE 80
+
 ENTRYPOINT ["/etc/entrypoint"]
 
diff --git a/Makefile b/Makefile
index dfe1660..6c3998a 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ run: # run container
 	docker run -i -t --detach --rm --env-file=$(config) --name="${FAAS_SMTP_NAME}"  ${FAAS_SHIB_IMAGE}
 
 run-nd: # run container in no-deamon mode
-	docker run -i -t --rm --env-file=$(config) --name="${FAAS_SHIB_NAME}" ${FAAS_SHIB_IMAGE}
+	docker run -i -t --rm --env-file=$(config) -p 9080:80 --name="${FAAS_SHIB_NAME}" ${FAAS_SHIB_IMAGE}
 
 up: build run # build and run container
 
diff --git a/conf/etc/entrypoint b/conf/etc/entrypoint
index 32fbeec..e29dce1 100755
--- a/conf/etc/entrypoint
+++ b/conf/etc/entrypoint
@@ -2,4 +2,7 @@
 
 sed -i '/imklog/s/^/#/' /etc/rsyslog.conf
 
+/usr/sbin/shib-keygen -n sp-encrypt
+/usr/sbin/shib-keygen -n sp-signing
+
 exec supervisord -c /etc/supervisord.conf
-- 
GitLab