Search code examples
oracledockermacosclouddevops

I make a docker image using linux and installed an Oracle Db 19c using the official base image linux/amd64. now running on Mac M1 give me an error


WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

Oracle DB offical image

https://registry.hub.docker.com/r/doctorkirk/oracle-19c

The listener supports no services
The command completed successfully
[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[FATAL] [DBT-05509] Failed to connect to the specified database (ORCL).
   CAUSE: OS Authentication might be disabled for this database (ORCL).
   ACTION: Specify a valid sysdba user name and password to connect to the database.
iqbal@MBP-von-furqan hiqs % docker run --name hiqsnew \
-p 1500:1500 \
-e ORACLE_SID=orcl \
-e ORACLE_PWD=pass \
-v /Users/iqbal/hiqs//opt/oracle/oradata \
doctorkirk/oracle-19c
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
cat: /sys/fs/cgroup/memory/memory.limit_in_bytes: No such file or directory
cat: /sys/fs/cgroup/memory/memory.limit_in_bytes: No such file or directory
/opt/oracle/runOracle.sh: line 102: [: -lt: unary operator expected
ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: pass

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 20-APR-2022 14:07:05

Copyright (c) 1991, 2020, Oracle.  All rights reserved.

Starting /opt/oracle/product/19c/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 19.0.0.0.0 - Production
System parameter file is /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/80536a439375/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                20-APR-2022 14:07:05
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/product/19c/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/80536a439375/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))

cat: /opt/oracle/cfgtoollogs/dbca/ORCL/ORCL.log: No such file or directory
cat: /opt/oracle/cfgtoollogs/dbca/ORCL.log: No such file or directory
mv: cannot stat '/opt/oracle/product/19c/dbhome_1/dbs/spfileORCL.ora': No such file or directory
mv: cannot stat '/opt/oracle/product/19c/dbhome_1/dbs/orapwORCL': No such file or directory
mv: cannot stat '/opt/oracle/product/19c/dbhome_1/network/admin/tnsnames.ora': No such file or directory
ORACLE_HOME = [/home/oracle] ? ORACLE_BASE environment variable is not being set since this
information is not available for the current user ID .
You can set ORACLE_BASE manually if it is required.
Resetting ORACLE_BASE to its previous value or ORACLE_HOME
The Oracle base remains unchanged with value /opt/oracle
/opt/oracle/checkDBStatus.sh: line 26: sqlplus: command not found
#####################################
########### E R R O R ###############
DATABASE SETUP WAS NOT SUCCESSFUL!
Please check output for further info!
########### E R R O R ###############
#####################################
The following output is now a tail of the alert.log:
tail: cannot open '/opt/oracle/diag/rdbms/*/*/trace/alert*.log' for reading: No such file or directory
tail: no files remaining


Solution

  • That is not an official Oracle image. You can find the official Oracle Docker images here: https://github.com/oracle/docker-images/tree/main/OracleDatabase

    Unfortunately, from their FAQ:

    Can I run Oracle Database containers on Apple M1 (Arm) devices?

    Oracle Database does not support the Arm architecture and will not run on Apple M1 silicon. You will see errors during the build process:

    error: sed: can't read /etc/security/limits.d/oracle-database-preinstall-18c.conf: No such file or directory

    This is caused by the Oracle Linux base image which does work on Arm not being able to install the Oracle Database preinstall requirements which are not available for that architecture.