V
V
Vladimir Dementiev2019-10-11 11:52:50
Docker
Vladimir Dementiev, 2019-10-11 11:52:50

Docker. How to complete the build of the image if the installation of the software goes into the background?

Good day!
I'm building an image with a deployed IBM MDM system.
I install IBM Websphere without any problems I ran
into a problem in docker when installing Oracle Client Database
The problematic code snippet:

COPY linuxx64_12201_client.zip /tmp

RUN cd /tmp && \
unzip linuxx64_12201_client.zip && \

USER mdm_dev 

RUN cd /tmp/client  && \
./runInstaller -silent  -force \
 FROM_LOCATION=/tmp/client/stage/products.xml \
 INVENTORY_LOCATION=/opt/IBM/oraInventory \
 UNIX_GROUP_NAME=mdm_dev \
 ORACLE_HOME=/opt/IBM/oracle/product/12.2.0/client_1 \
 ORACLE_HOME_NAME="OraClient12c_Home1" \
 ORACLE_BASE=/opt/IBM/oracle \
 oracle.install.client.installType="Administrator"

Here the installation takes place and you need to wait for the message:
Please check '/opt/IBM/oraInventory/logs/silentInstall2019-10-11_08-16-12AM.log' for more details.
As a root user, execute the following script(s):
1. /opt/IBM/oraInventory/orainstRoot.sh
Successfully Setup Software.

From which it follows that it is necessary to execute the script from root, which I do:
USER root

RUN cp /usr/bin/awk /bin/awk && \
/opt/IBM/oraInventory/orainstRoot.sh

But the following happens: at some point, the installation goes into the background, and when you press Enter, the console becomes available for typing the next command.
As a result, the build script goes further and the /opt/IBM/oraInventory/orainstRoot.sh script is executed, when the installation has not even started yet.
A wait command comes to mind for the time being to allow the installation to complete. But this option seems to me a crutch. Since there is no way to control the installation to the end. Or it will be too long.
Perhaps there is some other solution?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2019-10-11
@vitaly_il1

I would search the docs and forums for how to run orainstRoot.sh in non-interactive mode.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question