docker-oracle-xe-11g icon indicating copy to clipboard operation
docker-oracle-xe-11g copied to clipboard

Mac ARM x64 image

Open dizer opened this issue 4 years ago • 9 comments

So when I try to build an image on M1 mac:

# Dockerfile
FROM wnameless/oracle-xe-11g-r2
ADD db/setup_oracle.sql /docker-entrypoint-initdb.d/

I have an error:

[+] Building 4.8s (7/7) FINISHED                                                          
 => [internal] load build definition from Dockerfile.oracle                          0.4s
 => => transferring dockerfile: 90B                                                  0.0s
 => [internal] load .dockerignore                                                    0.5s
 => => transferring context: 35B                                                     0.0s
 => [internal] load metadata for docker.io/wnameless/oracle-xe-11g-r2:latest         3.4s
 => [internal] load build context                                                    0.3s
 => => transferring context: 63B                                                     0.0s
 => [1/2] FROM docker.io/wnameless/oracle-xe-11g-r2@sha256:e8cfa3733a2c11b415fb94a9  0.0s
 => CACHED [2/2] ADD db/setup_oracle.sql /docker-entrypoint-initdb.d/                0.0s
 => exporting to image                                                               0.3s
 => => exporting layers                                                              0.0s
 => => writing image sha256:ea1a4b02ed8c544b17b99efbc5ea90887627bc4c0c066792dd1e5b7  0.0s
 => => naming to docker.io/library/oracle                                            0.0s
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Starting Oracle Net Listener.
Starting Oracle Database 11g Express Edition instance.
/usr/sbin/startup.sh: running /docker-entrypoint-initdb.d/setup_oracle.sql
SQL*Plus: Release 11.2.0.2.0 Production on Mon Jan 11 08:26:59 2021
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
ERROR:
ORA-12547: TNS:lost contact
Enter user-name: Enter password: 
ERROR:
ORA-12547: TNS:lost contact

Probably the problem is WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested. Any chance to make it works on M1 Macs?

dizer avatar Jan 11 '21 08:01 dizer

I also have the same problem

peripurnama avatar Jun 30 '21 08:06 peripurnama

Hi, did you find something about this? 😓

jee4nc avatar Oct 17 '21 18:10 jee4nc

Hi, did you find something about this? 😓

Unfortunately not. Happy to have oracle behind.

dizer avatar Oct 17 '21 21:10 dizer

"ORA-12547: TNS:lost contact" usually means that the server process has died, in this case the installation would have failed and there will be more information in a logfile somewhere. I'd suggest to try it with Oracle XE 21c, e.g. https://hub.docker.com/r/gvenzl/oracle-xe. I don't have a M1 Mac yet - just curious to know if Oracle would work on it. There will be no native linux/arm64 image of Oracle database anytime soon I guess...

hal9ccc avatar Nov 19 '21 13:11 hal9ccc

"ORA-12547: TNS:lost contact" usually means that the server process has died, in this case the installation would have failed and there will be more information in a logfile somewhere. I'd suggest to try it with Oracle XE 21c, e.g. https://hub.docker.com/r/gvenzl/oracle-xe. I don't have a M1 Mac yet - just curious to know if Oracle would work on it. There will be no native linux/arm64 image of Oracle database anytime soon I guess...

Sadly, that image doesn't work either. Returns the same error.

mdvictor avatar Dec 13 '21 15:12 mdvictor

I was able to run this image on x64 vm on M1. But this solution is slooow.

maver1ck avatar Dec 15 '21 20:12 maver1ck

Wow, but that is great news anyway! How long did it take to run for the first time? On an Intel MBP 2019 I'd say it takes roughly 5-10 minutes until the database is ready. A more precise way to measure i/o performance would be using DBMS_RESOURCE_MANAGER as described here: - I'm getting max IOPS of 65000, latency 2 ms and max MB/s of 3200 - so nearly raw performance (using Parallels and Boot2Docker)

hal9ccc avatar Dec 15 '21 22:12 hal9ccc

I think the longest time was to decompress docker image :) It was around 5-10 minutes. I created VM using lima with x86_64 arch with docker-ce. And run this image. On second run it takes 2-3 minutes to run my automated tests on Oracle. So not so bad.

maver1ck avatar Dec 16 '21 06:12 maver1ck

yeah, I've heard lima is pretty good 👍! Would still be interesting to know the key I/O metrics

hal9ccc avatar Dec 16 '21 11:12 hal9ccc