oracle / docker-images

Official source of container configurations, images, and examples for Oracle products and projects
https://developer.oracle.com/use-cases/#containers
Universal Permissive License v1.0
6.58k stars 5.43k forks source link

Build of OracleDatabase 19.3 fails in kaniko (gitlab ci pipeline on Kubernetes) #2561

Open marcwittke opened 1 year ago

marcwittke commented 1 year ago

There is a permission issue:

INFO[0384] Running: [/bin/sh -c chmod ug+x $INSTALL_DIR/*.sh &&     sync &&     $INSTALL_DIR/$INSTALL_DB_BINARIES_FILE $DB_EDITION] 
sed: couldn't open temporary file /opt/install/sedMC9TWJ: Permission denied
mv: cannot move '/opt/install/LINUX.X64_193000_db_home.zip' to '/opt/oracle/product/19c/dbhome_1/LINUX.X64_193000_db_home.zip': Permission denied

The fix is to add a RUN chown before calling the install script:

https://github.com/marcwittke/docker-images/blob/main/OracleDatabase/SingleInstance/dockerfiles/19.3.0/Dockerfile#L108=L113

However, I won't open a PR because of all this legal kung-fu required here.

cf-sewe commented 1 year ago

Happens also on CIS hardened RHEL machine. Thanks for the patch 👍