From 2889095670ae9da3def4361a6d91813d810f445e Mon Sep 17 00:00:00 2001 From: Bystroushaak Date: Wed, 16 Mar 2016 12:29:38 +0100 Subject: [PATCH] #4: Added install scripts for resolver. --- resolver/docker/Dockerfile | 20 +++++++++++++------- resolver/docker/build_docker.sh | 3 +++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/resolver/docker/Dockerfile b/resolver/docker/Dockerfile index a3a2649..a6088f7 100644 --- a/resolver/docker/Dockerfile +++ b/resolver/docker/Dockerfile @@ -1,7 +1,7 @@ FROM centos:centos7 RUN yum -y update; yum clean all -RUN yum -y install sudo epel-release wget tar; yum clean all +RUN yum -y install sudo epel-release wget tar unzip; yum clean all @@ -59,15 +59,21 @@ EXPOSE 8080 # Copy and run installation scripts -#ADD /install_tomcat.sh /usr/bin/install_tomcat.sh -#ADD ./install_resolver.sh /usr/bin/install_resolver.sh -#RUN chmod +x /usr/bin/install_tomcat.sh -#RUN chmod +x /usr/bin/install_resolver.sh -#RUN /usr/bin/install_tomcat.sh -#RUN /usr/bin/install_resolver.sh +ADD install_resolver_postgres.sh /usr/bin/install_resolver_postgres.sh +ADD install_resolver2_root.sh /usr/bin/install_resolver2_root.sh +RUN chmod +x /usr/bin/install_resolver_postgres.sh +RUN chmod +x /usr/bin/install_resolver2_root.sh + # Create directory with configuration, which will be mounted from the host #RUN mkdir /etc/resolver + +# Install resolver +RUN sudo chmod 777 /usr/share/tomcat/webapps +RUN sudo -u postgres install_resolver_postgres.sh +RUN sudo install_resolver2_root.sh + + EXPOSE 80 EXPOSE 443 diff --git a/resolver/docker/build_docker.sh b/resolver/docker/build_docker.sh index bf0ec34..9163999 100755 --- a/resolver/docker/build_docker.sh +++ b/resolver/docker/build_docker.sh @@ -14,7 +14,10 @@ wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2F wget http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.8/bin/apache-tomcat-7.0.8.tar.gz +cp "$WORK_DIR/scripts/*" $TMP_DIR cp "$WORK_DIR/Dockerfile" . + + docker build --rm=true -t urn_nbn_resolver . cd $WORK_DIR