Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Oracle RAC image fail with DOCKER_BUILDKIT=1 #1416

Open
oehrlis opened this issue Oct 25, 2019 · 4 comments
Open

Build Oracle RAC image fail with DOCKER_BUILDKIT=1 #1416

oehrlis opened this issue Oct 25, 2019 · 4 comments
Assignees
Labels
RAC Oracle Database RAC

Comments

@oehrlis
Copy link
Contributor

oehrlis commented Oct 25, 2019

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.

#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

@oehrlis
Copy link
Contributor Author

oehrlis commented Oct 25, 2019

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...

@psaini79
Copy link
Member

@oehrlis

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

@gvenzl gvenzl added the RAC Oracle Database RAC label Nov 5, 2019
@pekare
Copy link

pekare commented Mar 31, 2020

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

@ghost
Copy link

ghost commented Apr 19, 2022

There is an extra space at the end of line 57 in the script OracleDatabase/RAC/OracleRealApplicationClusters/dockerfiles/19.3.0/installGridBinaries.sh
causing:

Complete!
Loaded plugins: ovl
Cleaning repos: ol7_latest
/opt/scripts/install/installGridBinaries.sh: line 57: : command not found
Launching Oracle Grid Infrastructure Setup Wizard...

removing the extra space at the end of this line:

unzip -q $INSTALL_SCRIPTS/$INSTALL_FILE_1 -d $GRID_HOME && \

clears the error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RAC Oracle Database RAC
Projects
None yet
Development

No branches or pull requests

4 participants