|
| 1 | +FROM centos:6 |
| 2 | + |
| 3 | +# install tools |
| 4 | +RUN yum install -y \ |
| 5 | + unzip \ |
| 6 | + wget \ |
| 7 | + git-all |
| 8 | + |
| 9 | +WORKDIR /root |
| 10 | + |
| 11 | +# install jdk7 |
| 12 | + |
| 13 | +RUN wget -O /root/jdk-7u79-linux-x64.rpm --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpm" |
| 14 | +RUN rpm -ivh jdk-7u79-linux-x64.rpm |
| 15 | + |
| 16 | +# install apache-ant |
| 17 | +RUN wget -O /root/apache-ant-1.7.1-bin.zip http://archive.apache.org/dist/ant/binaries/apache-ant-1.7.1-bin.zip |
| 18 | +RUN unzip /root/apache-ant-1.7.1-bin.zip |
| 19 | + |
| 20 | +# install grails |
| 21 | +RUN wget -O /root/grails-1.3.7.zip http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-1.3.7.zip |
| 22 | +RUN unzip /root/grails-1.3.7.zip |
| 23 | + |
| 24 | +# install jboss |
| 25 | +RUN wget -O /root/jboss-4.2.3.zip http://downloads.sourceforge.net/project/jboss/JBoss/JBoss-4.2.3.GA/jboss-4.2.3.GA.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fjboss%2Ffiles%2FJBoss%2FJBoss-4.2.3.GA |
| 26 | +RUN unzip /root/jboss-4.2.3.zip |
| 27 | + |
| 28 | +# set env variables |
| 29 | +ENV JAVA_HOME /usr/java/jdk1.7.0_79 |
| 30 | +ENV JBOSS_HOME /root/jboss-4.2.3.GA |
| 31 | +ENV GRAILS_HOME /root/grails-1.3.7 |
| 32 | +ENV ANT_HOME /root/apache-ant-1.7.1 |
| 33 | +ENV PATH $JAVA_HOME/bin:$GRAILS_HOME/bin:$ANT_HOME/bin:$PATH |
| 34 | + |
| 35 | +# init apache-ant |
| 36 | +COPY ant-libs.tgz /root/ |
| 37 | +RUN tar -xzvf /root/ant-libs.tgz -C ${ANT_HOME}/lib |
| 38 | + |
| 39 | +# init grails |
| 40 | +COPY json-rest-api-1.0.8.zip ${GRAILS_HOME}/plugins/grails-json-rest-api-1.0.8.zip |
| 41 | + |
| 42 | +# init jboss |
| 43 | +COPY jboss-service.xml ${JBOSS_HOME}/server/default/conf/ |
| 44 | +COPY myserver.keystore ${JBOSS_HOME}/server/default/conf/ |
| 45 | +COPY server.xml ${JBOSS_HOME}/server/default/deploy/jboss-web.deployer/ |
| 46 | +COPY run.conf ${JBOSS_HOME}/bin/ |
| 47 | + |
| 48 | +# remove useless files |
| 49 | +RUN rm /root/jdk-7u79-linux-x64.rpm |
| 50 | +RUN rm /root/jboss-4.2.3.zip |
| 51 | +RUN rm /root/apache-ant-1.7.1-bin.zip |
| 52 | +RUN rm /root/grails-1.3.7.zip |
| 53 | +RUN rm /root/ant-libs.tgz |
| 54 | + |
| 55 | +# create directories configured in properties file |
| 56 | +RUN mkdir /root/temp_files |
| 57 | +RUN mkdir -p /root/studiofiles/submissions |
| 58 | + |
| 59 | +# expose jboss ports |
| 60 | +EXPOSE 8180 443 |
| 61 | + |
0 commit comments