Docker-images: Build Oracle RAC image fail with DOCKER_BUILDKIT=1

Created on 25 Oct 2019  路  3Comments  路  Source: oracle/docker-images

Hi

I was start using the docker BuildKit when I realised an issue.

Enable BuildKit using DOCKER_BUILDKIT

export DOCKER_BUILDKIT=1
./buildDockerImage.sh -v 19.3.0

Error is somewhere at the stage where the binaries are installed.

```bash

8 244.6 Complete!

8 245.3 Loaded plugins: ovl

8 245.4 Cleaning repos: ol7_UEKR5 ol7_developer_EPEL ol7_latest

8 321.8 /opt/scripts/install/installGridBinaries.sh: line 57: : command not found

8 332.2 Launching Oracle Grid Infrastructure Setup Wizard...

8 332.2

8 340.3 [FATAL] [INS-40937] The following hostnames are invalid:buildkitsandbox

8 340.3 CAUSE: The hostname or names listed are invalid.

8 340.3 ACTION: Ensure that you are not providing aliases, and that the hostnames you provide are valid.

8 340.3 Moved the install session logs to:

8 340.3 /u01/app/oraInventory/logs/GridSetupActions2019-10-25_07-51-22AM

#8 340.4 /bin/sh: /u01/app/oraInventory/orainstRoot.sh: No such file or directory

executor failed running [/bin/sh -c chmod 755 $INSTALL_SCRIPTS/.sh && sync && $INSTALL_DIR/install/$CHECK_SPACE_FILE && $INSTALL_DIR/install/$SETUP_LINUX_FILE && $INSTALL_DIR/install/$GRID_SETUP_FILE && $INSTALL_DIR/install/$DB_SETUP_FILE && sed -e '/hard *memlock/s/^/#/g' -i /etc/security/limits.d/oracle-database-preinstall-19c.conf && su $GRID_USER -c "$INSTALL_DIR/install/$INSTALL_GRID_BINARIES_FILE EE $PATCH_NUMBER" && $INVENTORY/orainstRoot.sh && $GRID_HOME/root.sh && su $DB_USER -c "$INSTALL_DIR/install/$INSTALL_DB_BINARIES_FILE EE" && su $DB_USER -c "$INSTALL_DIR/install/$ENABLE_RAC_FILE" && $INVENTORY/orainstRoot.sh && $DB_HOME/root.sh && su $GRID_USER -c "$INSTALL_SCRIPTS/$GRID_HOME_CLEANUP" && su $DB_USER -c "$INSTALL_SCRIPTS/$ORACLE_HOME_CLEANUP" && $INSTALL_DIR/install/$FIXUP_PREQ_FILE && rm -rf $INSTALL_DIR/install && rm -rf $INSTALL_DIR/install && sync && chmod 755 $SCRIPT_DIR/.sh && chmod 755 $SCRIPT_DIR/.expect && chmod 666 $SCRIPT_DIR/.rsp && echo "nohup $SCRIPT_DIR/runOracle.sh &" >> /etc/rc.local && rm -f /etc/rc.d/init.d/oracle-database-preinstall-19c-firstboot && mkdir -p $GRID_HOME/dockerinit && cp $GRID_HOME/bin/$DOCKERORACLEINIT $GRID_HOME/dockerinit/ && chown $GRID_USER:oinstall $GRID_HOME/dockerinit && chown root:oinstall $GRID_HOME/dockerinit/$DOCKERORACLEINIT && chmod 4755 $GRID_HOME/dockerinit/$DOCKERORACLEINIT && ln -s $GRID_HOME/dockerinit/$DOCKERORACLEINIT /usr/sbin/oracleinit && chmod +x /etc/rc.d/rc.local && rm -f /etc/sysctl.d/99-oracle-database-preinstall-19c-sysctl.conf && rm -f /etc/sysctl.d/99-sysctl.conf && sync]: exit code: 127
There was an error building the image.
````

Disable the new BuildKit by set DOCKER_BUILDKIT=0 temporary solved the issue.

I have not yet looked into this, but I assume that there is an issue how regular build and BuildKit build are name their intermediate container during build.

Cheers
Stefan

RAC

Most helpful comment

By the way the error _command not found_ I also get when I do a regular successful build.

Cleaning repos: ol7_UEKR5 ol7_developer_EPEL ol7_latest
/opt/scripts/install/installGridBinaries.sh: line 57:  : command not found
Launching Oracle Grid Infrastructure Setup Wizard...

I get the same error during build of RAC container on Oracle Linux 7.7.
Following all the documentation to the letter.

It seems that the error gets suppressed when I break up the "&& \"-chain before the last line on installGridBinaries.sh after ".. -d $GRID_HOME".

# Install Oracle binaries
mkdir -p /home/grid/.ssh && \
chmod 700 /home/grid/.ssh && \
unzip -q $INSTALL_SCRIPTS/$INSTALL_FILE_1 -d $GRID_HOME
$GRID_HOME/gridSetup.sh -silent -responseFile $INSTALL_SCRIPTS/$GRID_SW_INSTALL_RSP -ignorePrereqFailure || true

All 3 comments

By the way the error _command not found_ I also get when I do a regular successful build.

Cleaning repos: ol7_UEKR5 ol7_developer_EPEL ol7_latest
/opt/scripts/install/installGridBinaries.sh: line 57:  : command not found
Launching Oracle Grid Infrastructure Setup Wizard...

@oehrlis

I will look into it. Were you able to build the image successfully?

By the way the error _command not found_ I also get when I do a regular successful build.

Cleaning repos: ol7_UEKR5 ol7_developer_EPEL ol7_latest
/opt/scripts/install/installGridBinaries.sh: line 57:  : command not found
Launching Oracle Grid Infrastructure Setup Wizard...

I get the same error during build of RAC container on Oracle Linux 7.7.
Following all the documentation to the letter.

It seems that the error gets suppressed when I break up the "&& \"-chain before the last line on installGridBinaries.sh after ".. -d $GRID_HOME".

# Install Oracle binaries
mkdir -p /home/grid/.ssh && \
chmod 700 /home/grid/.ssh && \
unzip -q $INSTALL_SCRIPTS/$INSTALL_FILE_1 -d $GRID_HOME
$GRID_HOME/gridSetup.sh -silent -responseFile $INSTALL_SCRIPTS/$GRID_SW_INSTALL_RSP -ignorePrereqFailure || true
Was this page helpful?
0 / 5 - 0 ratings