oraclesean / cloud-native-oracle

A repository of container image builds for Oracle databases, with support for Intel, Apple Silicon, and ARM processors.
30 stars 7 forks source link

Error building on apple silicon #6

Closed mikeyfafa closed 8 months ago

mikeyfafa commented 8 months ago

I get the following error when building on my MacBook m1.

 => [db 4/6] COPY --chown=oracle:oinstall ./config/manifest   /opt/install/                                                            0.0s
 => [stage-1 4/8] COPY --chown=oracle:oinstall manageOracle.sh         /opt/scripts/                                                   0.0s
 => [db 5/6] COPY --chown=oracle:oinstall ./database/         /opt/install/                                                            6.7s
 => ERROR [db 6/6] RUN  chmod ug+x /opt/scripts/manageOracle.sh &&      /opt/scripts/manageOracle.sh -O                               78.1s
------                                                                                                                                      
 > [db 6/6] RUN  chmod ug+x /opt/scripts/manageOracle.sh &&      /opt/scripts/manageOracle.sh -O:                                           
11.77 0                                                                                                                                     
77.37 -bash: /u01/app/oracle/product/19.19/dbhome_1/runInstaller: No such file or directory                                                 
77.37 /opt/scripts/manageOracle.sh: line 500: /u01/app/oracle/product/19.19/dbhome_1/perl/bin/perl: No such file or directory
77.37 mv: cannot stat '/u01/app/oracle/product/19.19/dbhome_1/perl': No such file or directory

I've tried this with docker desktop and Colima, maxing out the cpu to 6 and ram to 8. The result is the same with either. My suspicion is that the oracle zip file in /databases is not fully inflating as I can see perl/bin/perl if I unzip it manually.

I've tried working out how I could copy the unzipped directory in to the image build but the setup script is beyond me.

Any help would be much appreciated.

mikeyfafa commented 8 months ago

So I've managed to get the builds working but I build the base image first from here. https://github.com/oracle/docker-images/tree/main/OracleDatabase/SingleInstance

this gave me the oracle/database:19.3.0-ee and the slim and slim fast images built fine after this. I have not tried running them yet though.

One note I'd make is that I had tried fro about 12 hours yesterday to get both this base image build and the one from oracle/docker-images working with many workarounds attempted.

I think the reason the build worked today is the zip file I downloaded previously was the full arm64 image on the downloads page and safari inflated it, I zipped the folder and tried using that. This time I downloaded the individual component for the db ( link below )with brave browser and the zip file did not inflate.

https://www.oracle.com/database/technologies/oracle19c-linux-arm64-downloads.html