blob: 130244da4f07c7988e6eb9630b7d5f4a3e016a1c [file] [log] [blame]
talasila91d90792017-02-17 09:31:29 -05001# Pull base image.
2#FROM ubuntu-openjdk-8-jdk
3
4FROM ubuntu:14.04
5
Shashank Kumar Shankar47d9cad2017-06-14 15:32:06 -07006ARG HTTP_PROXY=${HTTP_PROXY}
7ARG HTTPS_PROXY=${HTTPS_PROXY}
8
9ENV http_proxy $HTTP_PROXY
10ENV https_proxy $HTTPS_PROXY
11
12RUN 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
talasila91d90792017-02-17 09:31:29 -050015# Install the python script required for "add-apt-repository"
16RUN apt-get update && apt-get install -y software-properties-common
17
18# Sets language to UTF8 : this works in pretty much all cases
19ENV LANG en_US.UTF-8
20RUN locale-gen $LANG
21
22# Setup the openjdk 8 repo
23RUN add-apt-repository ppa:openjdk-r/ppa
24
25# Install java8
Victor Morales19de3512017-07-03 16:23:17 -050026RUN apt-get update && apt-get install -y --force-yes openjdk-8-jdk
talasila91d90792017-02-17 09:31:29 -050027
28# Setup JAVA_HOME, this is useful for docker commandline
29ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
30RUN export JAVA_HOME
31
32# Show java version (for debugging)
33# RUN java -version
34
35RUN apt-get update
36RUN apt-get install -y curl
37# Install Tomcat
38RUN cd /tmp && curl -O https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.37/bin/apache-tomcat-8.0.37.tar.gz
39RUN tar -xzf /tmp/apache-tomcat-8.0.37.tar.gz
40RUN mv apache-tomcat-8.0.37 /opt
41
42# Define working directory.
43WORKDIR /opt/apache-tomcat-8.0.37/bin
44
45# Define commonly used ENV variables
46ENV PATH $PATH:$JAVA_HOME/bin:/opt/apache-tomcat-8.0.37/bin
47
48VOLUME /opt/apache-tomcat-8.0.37/logs
49
50ARG VERSION=${VERSION:-1.1.0}
51#LABEL Version=${VERSION}
52ARG SDK_DIR=${SDK_DIR}
53ARG FE_DIR=${FE_DIR}
54ARG PORTAL_SDK_DIR=${PORTAL_SDK_DIR}
55ARG PORTAL_DBC_DIR=${PORTAL_DBC_DIR}
56# Set up variables:
57ENV TOMCATHOME /opt/apache-tomcat-8.0.37
Christopher Lott (cl778h)d332e892017-07-12 16:26:42 -040058ENV PORTALHOME /PROJECT/APPS/ECOMPPORTAL/ECOMPPORTALAPP
talasila91d90792017-02-17 09:31:29 -050059ENV PORTALSDKHOME /PROJECT/APPS/ECOMPPORTAL/ECOMPSDKAPP
60ENV PORTALDBCHOME /PROJECT/APPS/ECOMPPORTAL/ECOMPDBCAPP
61# Install Common Software,Git,Apache
Christopher Lott (cl778h)d332e892017-07-12 16:26:42 -040062RUN mkdir -p $PORTALHOME && mkdir -p $PORTALSDKHOME && mkdir -p $PORTALDBCHOME
talasila91d90792017-02-17 09:31:29 -050063
Christopher Lott (cl778h)d332e892017-07-12 16:26:42 -040064COPY ${SDK_DIR} ${PORTALHOME}/
65# step 33
talasila91d90792017-02-17 09:31:29 -050066COPY ${PORTAL_SDK_DIR} ${PORTALSDKHOME}/
67COPY ${PORTAL_DBC_DIR} ${PORTALDBCHOME}/
68
Christopher Lott (cl778h)d332e892017-07-12 16:26:42 -040069RUN ln -s ${PORTALHOME} ${TOMCATHOME}/webapps/ECOMPPORTAL && ln -s ${PORTALSDKHOME} ${TOMCATHOME}/webapps/ECOMPSDKAPP && ln -s ${PORTALDBCHOME} ${TOMCATHOME}/webapps/ECOMPDBCAPP
talasila91d90792017-02-17 09:31:29 -050070
71
72# Define working directory.
73WORKDIR ${TOMCATHOME}/bin
74VOLUME ${TOMCATHOME}/logs
75# Define commonly used ENV variables
76ENV PATH $PATH:$JAVA_HOME/bin:${TOMCATHOME}/bin
77COPY configure-and-run.sh /PROJECT/OpenSource/UbuntuEP/
78
Christopher Lott (cl778h)d332e892017-07-12 16:26:42 -040079#RUN cp -r ${FE_DIR}/dist/public ${PORTALHOME}/public
talasila91d90792017-02-17 09:31:29 -050080
Christopher Lott (cl778h)c67680a2017-07-13 17:04:39 -040081COPY ${FE_DIR}/dist/public ${PORTALHOME}/public
talasila91d90792017-02-17 09:31:29 -050082# Define default command.
83#CMD ["bash"]
84CMD ["/PROJECT/OpenSource/UbuntuEP/configure-and-run.sh"]