From 69bad1ddb913e6c05a76f17caf799f8b47a85b4a Mon Sep 17 00:00:00 2001 From: villadalmine Date: Mon, 12 Sep 2016 14:41:54 -0300 Subject: [PATCH 1/5] Added test to database before start http --- BINSCRIPTS.md | 4 ++-- bin/build.sh | 6 ++++++ bin/destroy.sh | 10 ++++++++++ bin/install.sh | 13 +++++++++++++ bin/rebuild.sh | 3 +++ bin/rerun.sh | 3 +++ bin/run.sh | 5 +++++ bin/start.sh | 8 ++++++++ bin/stop.sh | 7 +++++++ bin/test.sh | 3 +++ container_files/bin/start.sh | 28 ++++++++++++++++++++++------ 11 files changed, 82 insertions(+), 8 deletions(-) create mode 100755 bin/build.sh create mode 100755 bin/destroy.sh create mode 100755 bin/install.sh create mode 100755 bin/rebuild.sh create mode 100755 bin/rerun.sh create mode 100755 bin/run.sh create mode 100755 bin/start.sh create mode 100755 bin/stop.sh create mode 100755 bin/test.sh diff --git a/BINSCRIPTS.md b/BINSCRIPTS.md index 8569b7d..7818108 100644 --- a/BINSCRIPTS.md +++ b/BINSCRIPTS.md @@ -9,7 +9,7 @@ If you are reading this file in BINSCRIPTS.md, your container project is likely To use these scripts yourself, issue this command: ``` -curl "https://github.internet2.edu/raw/docker/util/master/bin/install.sh?token=AAAAEddkrL9MeeA6VWcNn_PgV30r4lD1ks5XogeiwA%3D%3D" | bash +curl "https://github.internet2.edu/raw/docker/util/master/bin/install.sh?token=AAAAE4VRBLPB8VExPHSR5nCe791IAYqaks5Xzug5wA%3D%3D" | bash ``` ### common.bash @@ -38,4 +38,4 @@ This will also install a Jenkinsfile to your repository, if it doesn't have one. ### Testing -#### test.sh \ No newline at end of file +#### test.sh diff --git a/bin/build.sh b/bin/build.sh new file mode 100755 index 0000000..190c975 --- /dev/null +++ b/bin/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +source common.bash . + +echo "Building new Docker image($maintainer/$imagename)" +docker build --rm -t $maintainer/$imagename --build-arg maintainer=$maintainer --build-arg imagename=$imagename --build-arg version=$version . \ No newline at end of file diff --git a/bin/destroy.sh b/bin/destroy.sh new file mode 100755 index 0000000..929c13e --- /dev/null +++ b/bin/destroy.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +source common.bash . + +result=$(docker ps -a | grep $maintainer/$imagename) + +if [ ! -z "$result" ]; then + docker rm -f $(docker ps -a | grep $maintainer/$imagename | awk '{print $1}') + docker rmi -f $maintainer/$imagename +fi diff --git a/bin/install.sh b/bin/install.sh new file mode 100755 index 0000000..2db62de --- /dev/null +++ b/bin/install.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +git clone git@github.internet2.edu:docker/util.git +find util/bin -name "*.sh" -exec sh -c 'echo "$1" | sed "s/util\///" >> .gitignore' -- {} \; +mkdir -p bin +mv util/bin/* bin/. +mv util/README.md BINSCRIPTS.md +if [ ! -f common.bash ]; then + mv util/common.bash.sample common.bash +fi +if [ ! -f Jenkinsfile ]; then + mv util/Jenkinsfile.sample Jenkinsfile +fi +rm -rf util \ No newline at end of file diff --git a/bin/rebuild.sh b/bin/rebuild.sh new file mode 100755 index 0000000..3904e58 --- /dev/null +++ b/bin/rebuild.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +source bin/destroy.sh && source bin/build.sh \ No newline at end of file diff --git a/bin/rerun.sh b/bin/rerun.sh new file mode 100755 index 0000000..e279386 --- /dev/null +++ b/bin/rerun.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +source bin/rebuild.sh && source bin/run.sh $1 \ No newline at end of file diff --git a/bin/run.sh b/bin/run.sh new file mode 100755 index 0000000..8af1b06 --- /dev/null +++ b/bin/run.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +source common.bash . + +docker run -it $maintainer/$imagename $1 \ No newline at end of file diff --git a/bin/start.sh b/bin/start.sh new file mode 100755 index 0000000..9b74d72 --- /dev/null +++ b/bin/start.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +source common.bash . + +echo "Building new Docker image($registry/$maintainer/$imagename)" +docker run --name=$imagename -d $maintainer/$imagename + +exit 0 \ No newline at end of file diff --git a/bin/stop.sh b/bin/stop.sh new file mode 100755 index 0000000..01a2252 --- /dev/null +++ b/bin/stop.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +source common.bash . + +echo "Cleaning up Docker image($maintainer/$imagename)" +docker stop $imagename >> /dev/null +exit 0 diff --git a/bin/test.sh b/bin/test.sh new file mode 100755 index 0000000..6d4b8be --- /dev/null +++ b/bin/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +bats tests \ No newline at end of file diff --git a/container_files/bin/start.sh b/container_files/bin/start.sh index 29c15e6..c778966 100755 --- a/container_files/bin/start.sh +++ b/container_files/bin/start.sh @@ -15,8 +15,8 @@ then else echo "COmanage was configured" >>$log echo "COmanage was configured" - echo "Starting apache" >>$log - echo "Starting apache" + echo "Starting apache and shibd" >>$log + echo "Starting apache shibd" /usr/local/bin/httpd-shib-foreground fi else @@ -24,10 +24,26 @@ else date >> $log echo "Testing connectivity to database before continue with install" >> $log echo "Testing connectivity to database before continue with install" - /opt/wait-for-it/wait-for-it.sh $MYSQL_HOST:3306 -t $WAIT_TIME --strict -- /opt/bin/main.sh - + /opt/wait-for-it/wait-for-it.sh $MYSQL_HOST:3306 -t $WAIT_TIME --strict -- /opt/bin/main.sh >> $log + echo "Mariadb default port is open and test connection ok" + echo "Mariadb default port is open and test connection ok" >> $log + echo "Testing connectivy to database before continue with install" >> $log + echo "Testing connectivy to database before continue with install" + mysql -u $MYSQL_USER -p$MYSQL_PASSWORD -h "$MYSQL_HOST" -e "use $MYSQL_DATABASE; show tables;" + laststatus="$?" + echo "checking connectivity" >> $log + while [ "$laststatus" != "0" ]; do + mysql -u $MYSQL_USER -p$MYSQL_PASSWORD -h "$MYSQL_HOST" -e "use $MYSQL_DATABASE; show tables;" + laststatus="$?" + sleep 5 + date >> $log + echo "Trying to connect to mariadb container with $MYSQL_USER to database $MYSQL_DATABASE" + echo "Trying to connect to mariadb container with $MYSQL_USER to database $MYSQL_DATABASE" >> $log + done + echo "Database Connection with $MYSQL_USER to database $MYSQL_DATABASE was completed without any error" >> $log + echo "Database Connection with $MYSQL_USER to database $MYSQL_DATABASE was completed without any error" date >> $log - echo "Starting apache" >>$log - echo "Starting apache" + echo "Starting apache and shibd" >>$log + echo "Starting apache shibd" /usr/local/bin/httpd-shib-foreground fi From 14bd1b0a1d4d050b73ba7141d4f5b3792015ec80 Mon Sep 17 00:00:00 2001 From: villadalmine Date: Mon, 12 Sep 2016 14:43:04 -0300 Subject: [PATCH 2/5] removed util --- bin/build.sh | 6 ------ bin/destroy.sh | 10 ---------- bin/install.sh | 13 ------------- bin/rebuild.sh | 3 --- bin/rerun.sh | 3 --- bin/run.sh | 5 ----- bin/start.sh | 8 -------- bin/stop.sh | 7 ------- bin/test.sh | 3 --- 9 files changed, 58 deletions(-) delete mode 100755 bin/build.sh delete mode 100755 bin/destroy.sh delete mode 100755 bin/install.sh delete mode 100755 bin/rebuild.sh delete mode 100755 bin/rerun.sh delete mode 100755 bin/run.sh delete mode 100755 bin/start.sh delete mode 100755 bin/stop.sh delete mode 100755 bin/test.sh diff --git a/bin/build.sh b/bin/build.sh deleted file mode 100755 index 190c975..0000000 --- a/bin/build.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -source common.bash . - -echo "Building new Docker image($maintainer/$imagename)" -docker build --rm -t $maintainer/$imagename --build-arg maintainer=$maintainer --build-arg imagename=$imagename --build-arg version=$version . \ No newline at end of file diff --git a/bin/destroy.sh b/bin/destroy.sh deleted file mode 100755 index 929c13e..0000000 --- a/bin/destroy.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -source common.bash . - -result=$(docker ps -a | grep $maintainer/$imagename) - -if [ ! -z "$result" ]; then - docker rm -f $(docker ps -a | grep $maintainer/$imagename | awk '{print $1}') - docker rmi -f $maintainer/$imagename -fi diff --git a/bin/install.sh b/bin/install.sh deleted file mode 100755 index 2db62de..0000000 --- a/bin/install.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -git clone git@github.internet2.edu:docker/util.git -find util/bin -name "*.sh" -exec sh -c 'echo "$1" | sed "s/util\///" >> .gitignore' -- {} \; -mkdir -p bin -mv util/bin/* bin/. -mv util/README.md BINSCRIPTS.md -if [ ! -f common.bash ]; then - mv util/common.bash.sample common.bash -fi -if [ ! -f Jenkinsfile ]; then - mv util/Jenkinsfile.sample Jenkinsfile -fi -rm -rf util \ No newline at end of file diff --git a/bin/rebuild.sh b/bin/rebuild.sh deleted file mode 100755 index 3904e58..0000000 --- a/bin/rebuild.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -source bin/destroy.sh && source bin/build.sh \ No newline at end of file diff --git a/bin/rerun.sh b/bin/rerun.sh deleted file mode 100755 index e279386..0000000 --- a/bin/rerun.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -source bin/rebuild.sh && source bin/run.sh $1 \ No newline at end of file diff --git a/bin/run.sh b/bin/run.sh deleted file mode 100755 index 8af1b06..0000000 --- a/bin/run.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -source common.bash . - -docker run -it $maintainer/$imagename $1 \ No newline at end of file diff --git a/bin/start.sh b/bin/start.sh deleted file mode 100755 index 9b74d72..0000000 --- a/bin/start.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -source common.bash . - -echo "Building new Docker image($registry/$maintainer/$imagename)" -docker run --name=$imagename -d $maintainer/$imagename - -exit 0 \ No newline at end of file diff --git a/bin/stop.sh b/bin/stop.sh deleted file mode 100755 index 01a2252..0000000 --- a/bin/stop.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -source common.bash . - -echo "Cleaning up Docker image($maintainer/$imagename)" -docker stop $imagename >> /dev/null -exit 0 diff --git a/bin/test.sh b/bin/test.sh deleted file mode 100755 index 6d4b8be..0000000 --- a/bin/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -bats tests \ No newline at end of file From efaa5361e9003e859ac5e74a745d04ae9192764c Mon Sep 17 00:00:00 2001 From: villadalmine Date: Mon, 12 Sep 2016 16:02:12 -0300 Subject: [PATCH 3/5] Added httpd structure --- Dockerfile | 14 ++++++++++- container_files/bin/configure_httpd.sh | 15 ++++++++++- .../etc/httpd/conf.d/handlers.conf | 3 +++ container_files/etc/httpd/conf.d/ports.conf | 2 ++ container_files/etc/httpd/conf.d/ssl.conf | 6 +++++ .../{comanage.conf => virtual_host_443.conf} | 25 +------------------ .../etc/httpd/conf.d/virtual_host_80.conf | 5 ++++ .../etc/httpd/conf.modules.d/00-shib.conf | 1 + 8 files changed, 45 insertions(+), 26 deletions(-) create mode 100644 container_files/etc/httpd/conf.d/handlers.conf create mode 100644 container_files/etc/httpd/conf.d/ports.conf create mode 100644 container_files/etc/httpd/conf.d/ssl.conf rename container_files/etc/httpd/conf.d/{comanage.conf => virtual_host_443.conf} (76%) create mode 100644 container_files/etc/httpd/conf.d/virtual_host_80.conf create mode 100644 container_files/etc/httpd/conf.modules.d/00-shib.conf diff --git a/Dockerfile b/Dockerfile index 41681b7..99d3044 100644 --- a/Dockerfile +++ b/Dockerfile @@ -94,8 +94,20 @@ VOLUME /opt/shibboleth/ssl/ # Required volumes for mounting Apache SSL files into container VOLUME /opt/httpd/ssl/ +#Added ssl default conf +RUN ln -s /opt/etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf + +#Added shib module apache +RUN ln -s /opt/etc/httpd/conf.modules.d/00-shib.conf /etc/httpd/conf.modules.d/00-shib.conf +RUN ln -s /usr/lib64/shibboleth/mod_shib_24.so /etc/httpd/modules/mod_shib_24.so + +#Add httpd configuration +RUN ln -s /opt/etc/httpd/conf.d/ports.conf /etc/httpd/conf.d/ports.conf +RUN ln -s /opt/etc/httpd/conf.d/handlers.conf /etc/httpd/conf.d/handlers.conf +RUN ln -s /opt/etc/httpd/conf.d/virtual_host_80.conf /etc/httpd/conf.d/00-comanage-80.conf +RUN ln -s /opt/etc/httpd/conf.d/virtual_host_443.conf /etc/httpd/conf.d/00-comanage-443.conf # Port EXPOSE 80 443 -CMD ["/opt/bin/start.sh"] \ No newline at end of file +CMD ["/opt/bin/start.sh"] diff --git a/container_files/bin/configure_httpd.sh b/container_files/bin/configure_httpd.sh index d94aafe..4dd980f 100755 --- a/container_files/bin/configure_httpd.sh +++ b/container_files/bin/configure_httpd.sh @@ -1,5 +1,18 @@ #!/bin/bash log="/tmp/httpd.log" +date >> $log +echo "Configuring httpd: " > $log -echo "Configuring httpd: " > $log \ No newline at end of file +echo "Removing Listen 80 in httpd.conf" > $log +sed -i 's/^Listen 80$//' /etc/httpd/conf/httpd.conf + +for i in /usr/lib64/shibboleth/mod_shib_24.so /etc/httpd/modules/mod_shib_24.so /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/handlers.conf /etc/httpd/conf.d/ports.conf /etc/httpd/conf.modules.d/00-shib.conf /etc/httpd/conf.d/00-comanage_80.conf /etc/httpd/conf.d/00-comanage_443.conf + do + if [ -f $i ]; then + echo " $i is configured" >> $log + else + echo "$i is not configured >> $log + fi +date >> $log +echo "Configuration of httpd completed " >> $log diff --git a/container_files/etc/httpd/conf.d/handlers.conf b/container_files/etc/httpd/conf.d/handlers.conf new file mode 100644 index 0000000..e094143 --- /dev/null +++ b/container_files/etc/httpd/conf.d/handlers.conf @@ -0,0 +1,3 @@ +AddType text/html .php +php_value session.save_handler "files" +php_value session.save_path "/var/lib/php/session" diff --git a/container_files/etc/httpd/conf.d/ports.conf b/container_files/etc/httpd/conf.d/ports.conf new file mode 100644 index 0000000..cf2b7d0 --- /dev/null +++ b/container_files/etc/httpd/conf.d/ports.conf @@ -0,0 +1,2 @@ +Listen 80 http +Listen 443 https diff --git a/container_files/etc/httpd/conf.d/ssl.conf b/container_files/etc/httpd/conf.d/ssl.conf new file mode 100644 index 0000000..ccc067c --- /dev/null +++ b/container_files/etc/httpd/conf.d/ssl.conf @@ -0,0 +1,6 @@ +SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog +SSLSessionCache shmcb:/run/httpd/sslcache(512000) +SSLSessionCacheTimeout 300 +SSLRandomSeed startup file:/dev/urandom 256 +SSLRandomSeed connect builtin +SSLCryptoDevice builtin diff --git a/container_files/etc/httpd/conf.d/comanage.conf b/container_files/etc/httpd/conf.d/virtual_host_443.conf similarity index 76% rename from container_files/etc/httpd/conf.d/comanage.conf rename to container_files/etc/httpd/conf.d/virtual_host_443.conf index 0b8e83a..28d17ea 100644 --- a/container_files/etc/httpd/conf.d/comanage.conf +++ b/container_files/etc/httpd/conf.d/virtual_host_443.conf @@ -1,25 +1,3 @@ -Listen 80 http -Listen 443 https - -AddType text/html .php -php_value session.save_handler "files" -php_value session.save_path "/var/lib/php/session" - -LoadModule mod_shib /usr/lib64/shibboleth/mod_shib_24.so - - -ServerName http://COMANAGE_SERVER_FQDN:80 -UseCanonicalName On -RedirectMatch (.*) https://COMANAGE_SERVER_FQDN$1 - - -SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog -SSLSessionCache shmcb:/run/httpd/sslcache(512000) -SSLSessionCacheTimeout 300 -SSLRandomSeed startup file:/dev/urandom 256 -SSLRandomSeed connect builtin -SSLCryptoDevice builtin - ServerName https://COMANAGE_SERVER_FQDN:443 UseCanonicalName On @@ -103,5 +81,4 @@ Redirect "/registry/users/logout" "https://COMANAGE_SERVER_FQDN/Shibboleth.sso/L Require all denied - - + diff --git a/container_files/etc/httpd/conf.d/virtual_host_80.conf b/container_files/etc/httpd/conf.d/virtual_host_80.conf new file mode 100644 index 0000000..ffe62ec --- /dev/null +++ b/container_files/etc/httpd/conf.d/virtual_host_80.conf @@ -0,0 +1,5 @@ + +ServerName http://COMANAGE_SERVER_FQDN:80 +UseCanonicalName On +RedirectMatch (.*) https://COMANAGE_SERVER_FQDN$1 + diff --git a/container_files/etc/httpd/conf.modules.d/00-shib.conf b/container_files/etc/httpd/conf.modules.d/00-shib.conf new file mode 100644 index 0000000..0e5c7b2 --- /dev/null +++ b/container_files/etc/httpd/conf.modules.d/00-shib.conf @@ -0,0 +1 @@ +LoadModule mod_shib /usr/lib64/shibboleth/mod_shib_24.so From de4cc3039f64c186c1bfb9e973033c4205aa9faf Mon Sep 17 00:00:00 2001 From: villadalmine Date: Mon, 12 Sep 2016 16:48:27 -0300 Subject: [PATCH 4/5] Added support to httpd --- Dockerfile | 2 +- container_files/bin/configure_httpd.sh | 25 +++++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 99d3044..daf6cfa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -105,7 +105,7 @@ RUN ln -s /usr/lib64/shibboleth/mod_shib_24.so /etc/httpd/modules/mod_shib_24.so RUN ln -s /opt/etc/httpd/conf.d/ports.conf /etc/httpd/conf.d/ports.conf RUN ln -s /opt/etc/httpd/conf.d/handlers.conf /etc/httpd/conf.d/handlers.conf RUN ln -s /opt/etc/httpd/conf.d/virtual_host_80.conf /etc/httpd/conf.d/00-comanage-80.conf -RUN ln -s /opt/etc/httpd/conf.d/virtual_host_443.conf /etc/httpd/conf.d/00-comanage-443.conf +RUN [[ $CHANGE_TO_SSL_HTTPD_KEY && ${CHANGE_TO_SSL_HTTPD_KEY-x} ]] && [[ $CHANGE_TO_SSL_HTTPD_CERT && ${CHANGE_TO_SSL_HTTPD_CERT-x} ]] && ln -s /opt/etc/httpd/conf.d/virtual_host_443.conf /etc/httpd/conf.d/00-comanage-443.conf # Port EXPOSE 80 443 diff --git a/container_files/bin/configure_httpd.sh b/container_files/bin/configure_httpd.sh index 4dd980f..c864f20 100755 --- a/container_files/bin/configure_httpd.sh +++ b/container_files/bin/configure_httpd.sh @@ -2,17 +2,22 @@ log="/tmp/httpd.log" date >> $log -echo "Configuring httpd: " > $log +echo "Configuring httpd: " >> $log -echo "Removing Listen 80 in httpd.conf" > $log -sed -i 's/^Listen 80$//' /etc/httpd/conf/httpd.conf +sed -i "s|COMANAGE_SERVER_FQDN|$COMANAGE_SERVER_FQDN|g" /opt/etc/httpd/conf.d/virtual_host_80.conf >> $log +sed -i "s|COMANAGE_SERVER_FQDN|$COMANAGE_SERVER_FQDN|g" /opt/etc/httpd/conf.d/virtual_host_443.conf >> $log +if [[ $CHANGE_TO_SSL_HTTPD_KEY && ${CHANGE_TO_SSL_HTTPD_KEY-x} ]]; then + sed -i "s|CHANGE_TO_SSL_HTTPD_KEY|$CHANGE_TO_SSL_HTTPD_KEY|g" /opt/etc/httpd/conf.d/virtual_host_443.conf >> $log +else + echo "CHANGE_TO_SSL_HTTPD_KEY variable is not used" >> $log +fi +if [[ $CHANGE_TO_SSL_HTTPD_CERT && ${CHANGE_TO_SSL_HTTPD_CERT-x} ]]; then + sed -i "s|CHANGE_TO_SSL_HTTPD_CERT|$CHANGE_TO_SSL_HTTPD_CERT|g" /opt/etc/httpd/conf.d/virtual_host_443.conf >> $log +else + echo "CHANGE_TO_SSL_HTTPD_CERT variable is not used" >> $log +fi -for i in /usr/lib64/shibboleth/mod_shib_24.so /etc/httpd/modules/mod_shib_24.so /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/handlers.conf /etc/httpd/conf.d/ports.conf /etc/httpd/conf.modules.d/00-shib.conf /etc/httpd/conf.d/00-comanage_80.conf /etc/httpd/conf.d/00-comanage_443.conf - do - if [ -f $i ]; then - echo " $i is configured" >> $log - else - echo "$i is not configured >> $log - fi +echo "Removing Listen 80 in httpd.conf" >> $log +sed -i 's/^Listen 80$//' /etc/httpd/conf/httpd.conf date >> $log echo "Configuration of httpd completed " >> $log From 3af95c823862e6ec041e5d6eda15b05f20013db6 Mon Sep 17 00:00:00 2001 From: villadalmine Date: Mon, 12 Sep 2016 17:19:08 -0300 Subject: [PATCH 5/5] Removed 443 confiRemoved 443 config --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index daf6cfa..cd55b79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -105,7 +105,6 @@ RUN ln -s /usr/lib64/shibboleth/mod_shib_24.so /etc/httpd/modules/mod_shib_24.so RUN ln -s /opt/etc/httpd/conf.d/ports.conf /etc/httpd/conf.d/ports.conf RUN ln -s /opt/etc/httpd/conf.d/handlers.conf /etc/httpd/conf.d/handlers.conf RUN ln -s /opt/etc/httpd/conf.d/virtual_host_80.conf /etc/httpd/conf.d/00-comanage-80.conf -RUN [[ $CHANGE_TO_SSL_HTTPD_KEY && ${CHANGE_TO_SSL_HTTPD_KEY-x} ]] && [[ $CHANGE_TO_SSL_HTTPD_CERT && ${CHANGE_TO_SSL_HTTPD_CERT-x} ]] && ln -s /opt/etc/httpd/conf.d/virtual_host_443.conf /etc/httpd/conf.d/00-comanage-443.conf # Port EXPOSE 80 443