blob: efba0bddb8552842080066cd91712c20cf5c6ca1 [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
6# Install the python script required for "add-apt-repository"
7RUN apt-get update && apt-get install -y software-properties-common
8
9# Sets language to UTF8 : this works in pretty much all cases
10ENV LANG en_US.UTF-8
11RUN locale-gen $LANG
12
13# Setup the openjdk 8 repo
14RUN add-apt-repository ppa:openjdk-r/ppa
15
16# Install java8
17RUN apt-get update && apt-get install -y openjdk-8-jdk
18
19# Setup JAVA_HOME, this is useful for docker commandline
20ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
21RUN export JAVA_HOME
22
23# Show java version (for debugging)
24# RUN java -version
25
26RUN apt-get update
27RUN apt-get install -y curl
28# Install Tomcat
29RUN cd /tmp && curl -O https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.37/bin/apache-tomcat-8.0.37.tar.gz
30RUN tar -xzf /tmp/apache-tomcat-8.0.37.tar.gz
31RUN mv apache-tomcat-8.0.37 /opt
32
33# Define working directory.
34WORKDIR /opt/apache-tomcat-8.0.37/bin
35
36# Define commonly used ENV variables
37ENV PATH $PATH:$JAVA_HOME/bin:/opt/apache-tomcat-8.0.37/bin
38
39VOLUME /opt/apache-tomcat-8.0.37/logs
40
41ARG VERSION=${VERSION:-1.1.0}
42#LABEL Version=${VERSION}
43ARG SDK_DIR=${SDK_DIR}
44ARG FE_DIR=${FE_DIR}
45ARG PORTAL_SDK_DIR=${PORTAL_SDK_DIR}
46ARG PORTAL_DBC_DIR=${PORTAL_DBC_DIR}
47# Set up variables:
48ENV TOMCATHOME /opt/apache-tomcat-8.0.37
49ENV SDKHOME /PROJECT/APPS/ECOMPPORTAL/ECOMPPORTALAPP
50ENV PORTALSDKHOME /PROJECT/APPS/ECOMPPORTAL/ECOMPSDKAPP
51ENV PORTALDBCHOME /PROJECT/APPS/ECOMPPORTAL/ECOMPDBCAPP
52# Install Common Software,Git,Apache
53RUN mkdir -p $SDKHOME && mkdir -p $PORTALSDKHOME && mkdir -p $PORTALDBCHOME
54
55COPY ${SDK_DIR} ${SDKHOME}/
56COPY ${PORTAL_SDK_DIR} ${PORTALSDKHOME}/
57COPY ${PORTAL_DBC_DIR} ${PORTALDBCHOME}/
58
59RUN ln -s ${SDKHOME} ${TOMCATHOME}/webapps/ECOMPPORTAL && ln -s ${PORTALSDKHOME} ${TOMCATHOME}/webapps/ECOMPSDKAPP && ln -s ${PORTALDBCHOME} ${TOMCATHOME}/webapps/ECOMPDBCAPP
60
61
62# Define working directory.
63WORKDIR ${TOMCATHOME}/bin
64VOLUME ${TOMCATHOME}/logs
65# Define commonly used ENV variables
66ENV PATH $PATH:$JAVA_HOME/bin:${TOMCATHOME}/bin
67COPY configure-and-run.sh /PROJECT/OpenSource/UbuntuEP/
68
69#RUN cp -r ${FE_DIR}/dist/public ${SDKHOME}/public
70
71COPY ${FE_DIR}/dist/public ${SDKHOME}/public
72# Define default command.
73#CMD ["bash"]
74CMD ["/PROJECT/OpenSource/UbuntuEP/configure-and-run.sh"]