-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.template
86 lines (71 loc) · 2.81 KB
/
Dockerfile.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#===================================================
#
#
#
#===================================================
#===================================================
# Get the base image
#===================================================
FROM <TheOracleLinux>
#===================================================
# Maintainer
#===================================================
MAINTAINER Dirk Nachbar <[email protected]>
#===================================================
# Environment Variables required to build your WLS system
# Please verify or align the value for:
# ENV JDK_RPM
#===================================================
#ENV JDK_RPM jdk-8u60-linux-x64.rpm
ENV JDK_RPM <TheJdkRpm>
ENV WLS_SOURCE <TheWlsSource>
ENV JAVA_HOME /usr/java/default
ENV CONFIG_JVM_ARGS -Djava.security.egd=file:/dev/./urandom
#===================================================
# Creating filesystem, user and group
#===================================================
RUN mkdir /u00 && \
mkdir /u00/etc && \
mkdir /u00/app && \
mkdir /u00/app/oraInventory && \
groupadd oinstall && \
useradd -b /u00 -m -g oinstall -s /bin/bash oracle && \
chown -R oracle:oinstall /u00
#===================================================
# Copy the required packages and files
#===================================================
COPY $WLS_SOURCE /u00/
COPY $JDK_RPM /u00/
COPY install.rsp /u00/
COPY oraInst.loc /u00/
USER root
#===================================================
# Installation via rpm of JDK and clean up
#===================================================
RUN rpm -i /u00/$JDK_RPM && \
rm /u00/$JDK_RPM
#===================================================
# Set the required limits
#===================================================
RUN sed -i '/.*EOF/d' /etc/security/limits.conf && \
echo "oracle soft nofile 16384" >> /etc/security/limits.conf && \
echo "oracle hard nofile 16384" >> /etc/security/limits.conf && \
echo "# EOF" >> /etc/security/limits.conf
#===================================================
# Set the required kernel paramater
#===================================================
RUN sed -i '/.*EOF/d' /etc/sysctl.conf && \
echo "net.core.rmem_max=4192608" >> /etc/sysctl.conf && \
echo "net.core.wmem_max=4192608" >> /etc/sysctl.conf && \
echo "# EOF" >> /etc/security/limits.conf && \
sysctl -p
#===================================================
# Start with the installation of WLS
#===================================================
WORKDIR /u00
USER oracle
RUN java -jar $WLS_SOURCE -ignoreSysPrereqs -novalidation -silent -responseFile /u00/install.rsp -invPtrLoc /u00/oraInst.loc -jreLoc $JAVA_HOME && \
rm $WLS_SOURCE
WORKDIR /u00/app/oracle/
ENV PATH $PATH:/u00/app/oracle/product/weblogic-12.1.3/oracle_commom/common/bin
CMD ["bash"]