Created
January 14, 2020 20:54
-
-
Save scotas/127cfabdeee51b6064067264fadb5c45 to your computer and use it in GitHub Desktop.
Docker for building ols-dev:2.0.5 environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Before building this image oracle/database:19.3.0-ee must be available at your private registry | |
# See https://github.com/marcelo-ochoa/docker-images/blob/master/OracleDatabase/README.md for more details | |
# Finally build using ./buildDockerImage.sh script | |
FROM alpine:latest AS Solr40Source | |
LABEL maintainer="Marcelo Ochoa <mochoa@scotas.com>" | |
RUN apk add --update subversion curl && rm -rf /var/cache/apk/* | |
WORKDIR /src | |
RUN svn co http://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_4_0 | |
ADD ols-solr-lucene.patch /src/lucene_solr_4_0/ | |
WORKDIR /src/lucene_solr_4_0 | |
RUN svn patch /src/lucene_solr_4_0/ols-solr-lucene.patch | |
FROM alpine/git:latest AS OLSSource | |
LABEL maintainer="Marcelo Ochoa <mochoa@scotas.com>" | |
ARG REPO_URL | |
ENV REPO_URL ${REPO_URL:-https://github.com/scotas/ols.git} | |
ARG BRANCH | |
ENV BRANCH ${BRANCH:-master} | |
WORKDIR /src | |
# Clone GitHub Repo from an specific branch | |
RUN git clone -b $BRANCH $REPO_URL | |
FROM oracle/database:19.3.0-ee | |
LABEL maintainer="Marcelo Ochoa <mochoa@scotas.com>" | |
USER root | |
RUN yum -y --enablerepo ol7_optional_latest install ant ant-contrib ant-junit apache-ivy subversion && \ | |
yum clean all | |
ADD http://www.scotas.com/download/ols/19cR3/ODCI.jar /home/oracle/ | |
ADD http://www.scotas.com/download/ols/19cR3/converter.jar /home/oracle/ | |
ADD http://www.scotas.com/download/ols/19cR3/initsoxx.sql /home/oracle/ | |
ADD http://www.scotas.com/download/ols/19cR3/translator.jar /home/oracle/ | |
# Source of Apache Solr/Lucene | |
COPY --from=Solr40Source --chown=oracle:oinstall /src/lucene_solr_4_0/ /home/oracle/lucene_solr_4_0/ | |
# Source of Scotas OLS | |
COPY --from=OLSSource --chown=oracle:oinstall /src/ols/ /home/ols/ | |
RUN ln -s /home/oracle/lucene_solr_4_0/solr /home/solr && \ | |
ln -s /home/oracle/lucene_solr_4_0/lucene /home/lucene && \ | |
chown -R oracle:oinstall /home/oracle | |
USER oracle | |
WORKDIR /home/oracle | |
# Required libs for compiling | |
RUN mv $ORACLE_HOME/rdbms/jlib/ODCI.jar $ORACLE_HOME/rdbms/jlib/ODCI.jar.bak && \ | |
mv /home/oracle/ODCI.jar $ORACLE_HOME/rdbms/jlib/ODCI.jar && \ | |
mv $ORACLE_HOME/rdbms/admin/initsoxx.sql $ORACLE_HOME/rdbms/admin/initsoxx.sql.bak && \ | |
mv /home/oracle/initsoxx.sql $ORACLE_HOME/rdbms/admin/initsoxx.sql && \ | |
mv /home/oracle/converter.jar $ORACLE_HOME/rdbms/jlib/converter.jar && \ | |
mv /home/oracle/translator.jar $ORACLE_HOME/rdbms/jlib/translator.jar && \ | |
ln -s $ORACLE_HOME/jdbc/lib/ojdbc8.jar $ORACLE_HOME/jdbc/lib/ojdbc6.jar && \ | |
echo "ORCLPDB1= \ | |
(DESCRIPTION = \ | |
(ADDRESS = (PROTOCOL = TCP)(HOST = db)(PORT = 1521)) \ | |
(CONNECT_DATA = \ | |
(SERVER = DEDICATED) \ | |
(SERVICE_NAME = ORCLPDB1) \ | |
) \ | |
)" >> $ORACLE_HOME/network/admin/tnsnames.ora | |
ENV JAVA_HOME=$ORACLE_HOME/jdk LD_LIBRARY_PATH=$ORACLE_HOME/lib | |
WORKDIR /home | |
USER oracle | |
# Define default command to start Oracle Database. | |
CMD exec /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment