-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
131 lines (105 loc) · 5.27 KB
/
Dockerfile
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#-------------------------------------------------------------------------------
# Copyright 2023 Actian Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#-------------------------------------------------------------------------------
# Pre-requisites required before using this Dockerfile:
# 1. An installed and working Docker
# 2. Download Ingres / Actian X
# 3. Download OpenROAD
# 4. Download Apache Tomcat
# 4. Copy Ingres *.tgz , OpenROAD .tar.gz and Tomcat tar.gz files you downloaded to the same location as this Dockerfile
FROM rockylinux:9
# Docker file for Actian OpenROAD Server
LABEL com.actian.vendor="Actian Corporation" \
version=12.0\
description="Actian OpenROAD 12.0(Server)" \
maintainer=prasad.sawant@actian.com
#TAG actian openroad server v12 v12.0
# Pull dependencies
RUN dnf update -y && \
dnf install -y sudo wget which libaio libX11 libXext initscripts java-1.8.0-openjdk-devel libxcrypt-compat dos2unix python3
# Create python symlink
RUN alternatives --install /usr/bin/python python /usr/bin/python3 100
# Pull WinLib dependencies
RUN dnf -y groupinstall 'Development Tools'
RUN dnf -y install gcc libX11-devel freetype-devel zlib-devel libxcb-devel libxslt-devel libgcrypt-devel libxml2-devel gnutls-devel libpng-devel libjpeg-turbo-devel libtiff-devel dbus-devel fontconfig-devel
# This Dockerfile will work with any community linux version that follows this naming convention
ENV VERSION=12.0 \
INGRES_ARCHIVE=actianx-*-x86_64* \
TOMCAT_ARCHIVE=apache-tomcat*.tar.gz \
OPENROAD_ARCHIVE=openroad-*-a64_lnx* \
OPENROAD_APP=orserver-add-*.zip \
II_SYSTEM=/IngresOR \
II_INSTALLATION=OR \
TIMEZONE=America/Los_Angeles \
LicDir=/License \
II_RESPONSE_FILE=/response_file.rsp \
CATALINA_HOME=/usr/local/tomcat \
GRPCURL_VERSION=1.9.1
# Install gRPCurl
RUN wget https://github.com/fullstorydev/grpcurl/releases/download/v${GRPCURL_VERSION}/grpcurl_${GRPCURL_VERSION}_linux_x86_64.tar.gz
RUN tar -xvzf grpcurl_${GRPCURL_VERSION}_linux_x86_64.tar.gz
RUN chmod +x grpcurl
RUN mv grpcurl /usr/local/bin/grpcurl
# Pull in Ingres saveset
ADD savesets/${INGRES_ARCHIVE}.tgz /tmp/.
COPY savesets/${OPENROAD_ARCHIVE}.tar.gz .
# Setup for OpenROAD App Deployment
RUN mkdir /deploy
COPY savesets/orjarinstall* /deploy
COPY savesets/${OPENROAD_APP} /deploy
ADD licdata/license.xml $LicDir/
ADD ${II_RESPONSE_FILE} /
RUN dos2unix ${II_RESPONSE_FILE}
RUN useradd actian
# Setup Tomcat
ADD savesets/${TOMCAT_ARCHIVE} /usr/local
RUN cd /usr/local && mv apache-tomcat* tomcat && chown -R actian:actian ${CATALINA_HOME}
# Install Ingres
RUN mkdir -p ${II_SYSTEM}/ingres
RUN chown -R actian:actian ${II_SYSTEM}/ingres
COPY ingOR.sh $II_SYSTEM/ingres/.ingORsh
RUN dos2unix $II_SYSTEM/ingres/.ingORsh
COPY ingbld_install.sh $II_SYSTEM/ingres/ingbld_install.sh
RUN dos2unix $II_SYSTEM/ingres/ingbld_install.sh
RUN cd ${II_SYSTEM}/ingres && su actian -c ./ingbld_install.sh
RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone
# set environment globally
RUN cp $II_SYSTEM/ingres/.ingORsh /etc/profile.d/ingresOR.sh
# Installing OpenROAD
RUN source /etc/profile.d/ingresOR.sh && \
tar xzf ${OPENROAD_ARCHIVE}.tar.gz orinstall.sh cilicchk lichostinfo && \
mv cilicchk lichostinfo $II_SYSTEM/ingres/utility && \
chown actian:actian $II_SYSTEM/ingres/utility/cilicchk && \
chown actian:actian $II_SYSTEM/ingres/utility/lichostinfo && \
chmod u+x ./orinstall.sh && \
su actian -c "sh orinstall.sh -t orrun -licdir ${LicDir} -f ${OPENROAD_ARCHIVE}.tar.gz -l accept -r O" && \
sed -i -e "s,`hostname`,localhost," $II_SYSTEM/ingres/files/orserver.json
RUN cp /home/actian/.orORsh /etc/profile.d/ingresOR.sh && \
# COMPUTERNAME is required for orjarinstall.py/orserveradm.py AddApp
echo "export COMPUTERNAME=localhost" >> /etc/profile.d/ingresOR.sh && \
echo "export CATALINA_PID=${CATALINA_HOME}/temp/tomcat.pid" >> /etc/profile.d/ingresOR.sh && \
echo "export CATALINA_HOME=${CATALINA_HOME}" >> /etc/profile.d/ingresOR.sh && \
echo "export CATALINA_BASE=${CATALINA_HOME}" >> /etc/profile.d/ingresOR.sh && \
echo 'export JAVA_OPTS="-Djava.library.path=$II_SYSTEM/ingres/lib"' >> /etc/profile.d/ingresOR.sh
# Install Ingres control script
ADD or_dockerctl.sh $II_SYSTEM/ingres/utility/or_dockerctl
RUN dos2unix $II_SYSTEM/ingres/utility/or_dockerctl
RUN chmod 755 $II_SYSTEM/ingres/utility/or_dockerctl
RUN ln -s $II_SYSTEM/ingres/utility/or_dockerctl /usr/local/bin/or_dockerctl
# Deploy OpenROAD gRPC servlet
RUN cp -p $II_SYSTEM/ingres/orgrpcjava/openroadg.war $CATALINA_HOME/webapps
# Allow external connections
EXPOSE 50052 8080
# Allow external locations
VOLUME /deploy
VOLUME /logs
ENTRYPOINT ["or_dockerctl"]