talasila | 91d9079 | 2017-02-17 09:31:29 -0500 | [diff] [blame] | 1 | # Pull base image. |
| 2 | #FROM ubuntu-openjdk-8-jdk |
| 3 | |
| 4 | FROM ubuntu:14.04 |
| 5 | |
Shashank Kumar Shankar | 47d9cad | 2017-06-14 15:32:06 -0700 | [diff] [blame] | 6 | ARG HTTP_PROXY=${HTTP_PROXY} |
| 7 | ARG HTTPS_PROXY=${HTTPS_PROXY} |
| 8 | |
| 9 | ENV http_proxy $HTTP_PROXY |
| 10 | ENV https_proxy $HTTPS_PROXY |
| 11 | |
| 12 | RUN if [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \ |
| 13 | if [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi |
| 14 | |
talasila | 91d9079 | 2017-02-17 09:31:29 -0500 | [diff] [blame] | 15 | # Install the python script required for "add-apt-repository" |
| 16 | RUN apt-get update && apt-get install -y software-properties-common |
| 17 | |
| 18 | # Sets language to UTF8 : this works in pretty much all cases |
| 19 | ENV LANG en_US.UTF-8 |
| 20 | RUN locale-gen $LANG |
| 21 | |
| 22 | # Setup the openjdk 8 repo |
| 23 | RUN add-apt-repository ppa:openjdk-r/ppa |
| 24 | |
| 25 | # Install java8 |
Victor Morales | 19de351 | 2017-07-03 16:23:17 -0500 | [diff] [blame] | 26 | RUN apt-get update && apt-get install -y --force-yes openjdk-8-jdk |
talasila | 91d9079 | 2017-02-17 09:31:29 -0500 | [diff] [blame] | 27 | |
| 28 | # Setup JAVA_HOME, this is useful for docker commandline |
| 29 | ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/ |
| 30 | RUN export JAVA_HOME |
| 31 | |
| 32 | # Show java version (for debugging) |
| 33 | # RUN java -version |
| 34 | |
| 35 | RUN apt-get update |
| 36 | RUN apt-get install -y curl |
| 37 | # Install Tomcat |
| 38 | RUN cd /tmp && curl -O https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.37/bin/apache-tomcat-8.0.37.tar.gz |
| 39 | RUN tar -xzf /tmp/apache-tomcat-8.0.37.tar.gz |
| 40 | RUN mv apache-tomcat-8.0.37 /opt |
| 41 | |
| 42 | # Define working directory. |
| 43 | WORKDIR /opt/apache-tomcat-8.0.37/bin |
| 44 | |
| 45 | # Define commonly used ENV variables |
| 46 | ENV PATH $PATH:$JAVA_HOME/bin:/opt/apache-tomcat-8.0.37/bin |
| 47 | |
| 48 | VOLUME /opt/apache-tomcat-8.0.37/logs |
| 49 | |
| 50 | ARG VERSION=${VERSION:-1.1.0} |
| 51 | #LABEL Version=${VERSION} |
| 52 | ARG SDK_DIR=${SDK_DIR} |
| 53 | ARG FE_DIR=${FE_DIR} |
| 54 | ARG PORTAL_SDK_DIR=${PORTAL_SDK_DIR} |
| 55 | ARG PORTAL_DBC_DIR=${PORTAL_DBC_DIR} |
| 56 | # Set up variables: |
| 57 | ENV TOMCATHOME /opt/apache-tomcat-8.0.37 |
Christopher Lott (cl778h) | d332e89 | 2017-07-12 16:26:42 -0400 | [diff] [blame] | 58 | ENV PORTALHOME /PROJECT/APPS/ECOMPPORTAL/ECOMPPORTALAPP |
talasila | 91d9079 | 2017-02-17 09:31:29 -0500 | [diff] [blame] | 59 | ENV PORTALSDKHOME /PROJECT/APPS/ECOMPPORTAL/ECOMPSDKAPP |
| 60 | ENV PORTALDBCHOME /PROJECT/APPS/ECOMPPORTAL/ECOMPDBCAPP |
| 61 | # Install Common Software,Git,Apache |
Christopher Lott (cl778h) | d332e89 | 2017-07-12 16:26:42 -0400 | [diff] [blame] | 62 | RUN mkdir -p $PORTALHOME && mkdir -p $PORTALSDKHOME && mkdir -p $PORTALDBCHOME |
talasila | 91d9079 | 2017-02-17 09:31:29 -0500 | [diff] [blame] | 63 | |
Christopher Lott (cl778h) | d332e89 | 2017-07-12 16:26:42 -0400 | [diff] [blame] | 64 | COPY ${SDK_DIR} ${PORTALHOME}/ |
| 65 | # step 33 |
talasila | 91d9079 | 2017-02-17 09:31:29 -0500 | [diff] [blame] | 66 | COPY ${PORTAL_SDK_DIR} ${PORTALSDKHOME}/ |
| 67 | COPY ${PORTAL_DBC_DIR} ${PORTALDBCHOME}/ |
| 68 | |
Christopher Lott (cl778h) | d332e89 | 2017-07-12 16:26:42 -0400 | [diff] [blame] | 69 | RUN ln -s ${PORTALHOME} ${TOMCATHOME}/webapps/ECOMPPORTAL && ln -s ${PORTALSDKHOME} ${TOMCATHOME}/webapps/ECOMPSDKAPP && ln -s ${PORTALDBCHOME} ${TOMCATHOME}/webapps/ECOMPDBCAPP |
talasila | 91d9079 | 2017-02-17 09:31:29 -0500 | [diff] [blame] | 70 | |
| 71 | |
| 72 | # Define working directory. |
| 73 | WORKDIR ${TOMCATHOME}/bin |
| 74 | VOLUME ${TOMCATHOME}/logs |
| 75 | # Define commonly used ENV variables |
| 76 | ENV PATH $PATH:$JAVA_HOME/bin:${TOMCATHOME}/bin |
| 77 | COPY configure-and-run.sh /PROJECT/OpenSource/UbuntuEP/ |
| 78 | |
Christopher Lott (cl778h) | d332e89 | 2017-07-12 16:26:42 -0400 | [diff] [blame] | 79 | #RUN cp -r ${FE_DIR}/dist/public ${PORTALHOME}/public |
talasila | 91d9079 | 2017-02-17 09:31:29 -0500 | [diff] [blame] | 80 | |
Christopher Lott (cl778h) | c67680a | 2017-07-13 17:04:39 -0400 | [diff] [blame] | 81 | COPY ${FE_DIR}/dist/public ${PORTALHOME}/public |
talasila | 91d9079 | 2017-02-17 09:31:29 -0500 | [diff] [blame] | 82 | # Define default command. |
| 83 | #CMD ["bash"] |
| 84 | CMD ["/PROJECT/OpenSource/UbuntuEP/configure-and-run.sh"] |