Comments (31)
There has been some movement over on oracle/docker-images#1951 in the meantime.
It seems that users are able to spin up Oracle databases by using a Docker Desktop alternative called colima
.
Unfortunately, I still don't have an M1 Mac so I cannot verify myself but if anybody would be able to verify the approach reported over there, I would be deeply grateful.
The solution seems to be:
brew install colima
brew install docker
colima start --memory 4 --arch x86_64
docker run ...
from oci-oracle-xe.
Hey all, I've been chatting with my friends at Testcontainers (wink, wink @kiview and @eddumelendez) and they have had other users bring up the question of colima
, see here.
It appears, that with the following config, Testcontainers works just fine with colima
:
export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock
export DOCKER_HOST="unix://${HOME}/.colima/docker.sock"
from oci-oracle-xe.
Hey all, I've been chatting with my friends at Testcontainers (wink, wink @kiview and @eddumelendez) and they have had other users bring up the question of
colima
, see here.It appears, that with the following config, Testcontainers works just fine with
colima
:export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock export DOCKER_HOST="unix://${HOME}/.colima/docker.sock"
I can confirm this is working 🥳 🥳 🥳
from oci-oracle-xe.
That's amazing, thanks so much for doing that, @tomdevroomen!
I have added the instructions into the ReadMe as well.
Hopefully, this will help all other Apple M chip users to run these images!
from oci-oracle-xe.
@gvenzl @XavierLevaux I am also trying to get this running on Apple silicon. I have specified the --platform linux/amd64
attribute to tell Docker to emulate x86, but I am getting the same error as above. I'll try to run buildx
locally to see if that makes a difference, and I'll report any findings.
Additionally, I'm willing to run any tests or gather additional diagnostics if anyone has ideas on how to make it work.
from oci-oracle-xe.
No. I should have come back to post my findings. I tried to build with different versions of XE with no luck. All resulted in the same TNS error.
I may have to resort to a UTM based Linux VM until there is an acceptable alternative.
from oci-oracle-xe.
I just ran into the same problem :-(. @gvenzl any chance you could add a note about the apple/arm compatibility problems to your dockerhub docs?
from oci-oracle-xe.
The above-mentioned solution is working perfectly 👍
from oci-oracle-xe.
I've written 2 blogpost to summarise it all:
https://blog.jdriven.com/2022/07/running-oracle-xe-on-apple-silicon/
https://blog.jdriven.com/2022/07/running-oracle-xe-with-testcontainers-on-apple-silicon/
In both blogs I referred to your work @gvenzl
from oci-oracle-xe.
Hi @XavierLevaux, according to oracle/docker-images#1951 it is currently not possible to run Oracle Database on ARM chipsets. I have heard that Apple has an x86 emulator that should automatically take care of x86 apps running on M1 but given that I do not have an M1 Mac myself yet, I cannot confirm or deny that.
from oci-oracle-xe.
Same issue on my new M1 machine.
Have been able to find a workaround, @cofin ?
from oci-oracle-xe.
Thanks a lot for your research on this, @cofin! It is highly appreciated!
from oci-oracle-xe.
Awesome, thanks so much for confirming, @salah3x!
from oci-oracle-xe.
I can confirm it also works running on UTM and lima
from oci-oracle-xe.
Great, thanks a lot, @tomdevroomen!
I would like to add some generic info about how to run these images on Mac M1 into the ReadMe.
But given that I am not running on an M1 myself, I'm not entirely sure what method would be the most acceptable to M1 users.
I assume removing Docker Desktop and installing colima
means that all images running on that Mac M1 will have to be x86_64
images? Would that cause any unwanted side effects, other than not wanting to run an x86_64
image when an arm64
is available?
from oci-oracle-xe.
I've got lima running besides docker desktop.
Via docker context you're able to choose to run docker commands through lima.
I'm using your image within a testcontainers setup, but all those workarounds aren't compatible with testcontainers
Steps to setup with UTM, but compared to (co)lima it is more work and in my experience also slower.
apple-silicon-database-installation.md
Think I'll replace my lima installation with colima, as that's exactly what I need from lima :)
from oci-oracle-xe.
setup with colima:
- Install
colima
as per https://github.com/abiosoft/colima#installation - Run
colima start --arch x86_64
, the--arch x64_86
is the important part here to match the architecture to be compatible with your docker images. - Start container as usual
You should give it some time to start up, but I was able to start up the full
version.
from oci-oracle-xe.
but all those workarounds aren't compatible with testcontainers
I was able to make it work w/ testcontainers, the idea is to make sure /var/run/docker.sock
is accessible.
It's symlinked to ~/.colima/default/docker.sock
when starting colima, but double-check it anyway (I had to loosen up the permissions on the file to make it work).
Running colima status
should print the original path of the docker socket, u can also use that to customize testcontainers' host detection.
from oci-oracle-xe.
but all those workarounds aren't compatible with testcontainers
I was able to make it work w/ testcontainers, the idea is to make sure
/var/run/docker.sock
is accessible. It's symlinked to~/.colima/default/docker.sock
when starting colima, but double-check it anyway (I had to loosen up the permissions on the file to make it work). Runningcolima status
should print the original path of the docker socket, u can also use that to customize testcontainers' host detection.
I've tried the testcontainers host detection before, but I wasn't able to make it work. It was overwritten every time with the defaults when starting testcontainers.
I'll give the symlink a try.
from oci-oracle-xe.
@salah3x I've change the host detection for testcontainers, and it is picking up the colima docker.sock.
But it's unable to connect to the Ruyk container
08:13:33.943 [main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Found Docker environment with Environment variables, system properties and defaults. Resolved dockerHost=unix:///Users/user/.colima/default/docker.sock
08:13:33.944 [main] INFO org.testcontainers.DockerClientFactory - Docker host IP address is localhost
08:13:34.277 [main] INFO org.testcontainers.DockerClientFactory - Connected to docker:
Server Version: 20.10.11
API Version: 1.41
Operating System: Alpine Linux v3.14
Total Memory: 3938 MB
08:13:34.378 [main] INFO org.testcontainers.utility.RegistryAuthLocator - Credential helper/store (docker-credential-desktop) does not have credentials for index.docker.io
08:13:37.693 [testcontainers-ryuk] WARN org.testcontainers.utility.RyukResourceReaper - Can not connect to Ryuk at localhost:49154
How we you able to resolve this?
from oci-oracle-xe.
Great, glad to hear that! :)
from oci-oracle-xe.
I've written 2 blogpost to summarise it all:
https://blog.jdriven.com/2022/07/running-oracle-xe-on-apple-silicon/ https://blog.jdriven.com/2022/07/running-oracle-xe-with-testcontainers-on-apple-silicon/
In both blogs I referred to your work @gvenzl
@tomdevroomen Hi have you had any perf issue? I've tried same setup but takes really long for my app to connect to oracle container once it is up and running. Used to take 20 sec, now more like 2 mins.
from oci-oracle-xe.
I've written 2 blogpost to summarise it all:
https://blog.jdriven.com/2022/07/running-oracle-xe-on-apple-silicon/ https://blog.jdriven.com/2022/07/running-oracle-xe-with-testcontainers-on-apple-silicon/
In both blogs I referred to your work @gvenzl@tomdevroomen Hi have you had any perf issue? I've tried same setup but takes really long for my app to connect to oracle container once it is up and running. Used to take 20 sec, now more like 2 mins.
Yes, there's a performance penaulty, as with colima virtualisation is used, so instructions need to be translated.
But I take that for granted, as I have no other option.
from oci-oracle-xe.
Worked with colima here as well, thanks!
from oci-oracle-xe.
Hi
It works fine, thanks! but after that all other docker images (here: redis, rabbit) were unusable and i had to create them as new ones and they are visible under 'docker ps' command but not in Docker desktop app. Docker App is empty. Correct?
from oci-oracle-xe.
The Docker Desktop GUI is in no way connected to Colima. The Docker CLI working with Colima probably works through the Docker context.
from oci-oracle-xe.
I've written 2 blogpost to summarise it all:
https://blog.jdriven.com/2022/07/running-oracle-xe-on-apple-silicon/ https://blog.jdriven.com/2022/07/running-oracle-xe-with-testcontainers-on-apple-silicon/
In both blogs I referred to your work @gvenzl
Hi @tomdevroomen. I followed the steps in your first blog post, but I am still running into issues and I don't know what I'm missing. Would appreciate a second pair of eyes for this.
Here is my docker-compose YAML file:
version: '3.1'
services:
oracle:
container_name: oracleDB
image: gvenzl/oracle-xe:18
platform: linux/amd64
ports:
- "1521:1521"
environment:
ORACLE_PASSWORD: "StrongPassword"
And this is the log:
CONTAINER: starting up...
CONTAINER: first database startup, initializing...
CONTAINER: uncompressing database data files, please wait...
CONTAINER: done uncompressing database data files, duration: 14 seconds.
CONTAINER: starting up Oracle Database...
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 08-AUG-2023 10:06:26
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Starting /opt/oracle/product/18c/dbhomeXE/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 18.0.0.0.0 - Production
System parameter file is /opt/oracle/product/18c/dbhomeXE/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/17fe1d08dc70/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 08-AUG-2023 10:06:26
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /opt/oracle/product/18c/dbhomeXE/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/17fe1d08dc70/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
The listener supports no services
The command completed successfully
ERROR:
ORA-12547: TNS:lost contact
SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
CONTAINER: starting up...
CONTAINER: database already initialized.
CONTAINER: starting up Oracle Database...
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 08-AUG-2023 10:07:20
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Starting /opt/oracle/product/18c/dbhomeXE/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 18.0.0.0.0 - Production
System parameter file is /opt/oracle/product/18c/dbhomeXE/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/17fe1d08dc70/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 08-AUG-2023 10:07:22
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /opt/oracle/product/18c/dbhomeXE/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/17fe1d08dc70/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
The listener supports no services
The command completed successfully
ERROR:
ORA-12547: TNS:lost contact
SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
SP2-0306: Invalid option.
Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM|SYSBACKUP|SYSDG|SYSKM|SYSRAC}]
where <logon> ::= <username>[/<password>][@<connect_identifier>]
<proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>]
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
from oci-oracle-xe.
@joc-a Looks like you're still trying to run de oracle image with a default docker env.
ERROR: ORA-12547: TNS:lost contact
is the exact message I got when running it on a default docker env.
Make sure you run you compose file with the docker instance running on Colima.
You can verify this with docker context list
and having the active context pointing to the colima docker endpoint like this (the one with the *
is the currently active one):
docker context list
NAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
colima moby colima unix:///Users/user/.colima/default/docker.sock
default * moby Current DOCKER_HOST based configuration unix:///Users/user/.colima/docker.sock
output of env | grep DOCKER_HOST
should be
> env | grep DOCKER_HOST
DOCKER_HOST=unix:///Users/user/.colima/docker.sock
if this all doesn't point to colima, set the DOCKER_HOST
, which is only active for the current shell where you're working in.
from oci-oracle-xe.
@joc-a Looks like you're still trying to run de oracle image with a default docker env.
ERROR: ORA-12547: TNS:lost contact
is the exact message I got when running it on a default docker env. Make sure you run you compose file with the docker instance running on Colima. You can verify this withdocker context list
and having the active context pointing to the colima docker endpoint like this (the one with the*
is the currently active one):docker context list NAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR colima moby colima unix:///Users/user/.colima/default/docker.sock default * moby Current DOCKER_HOST based configuration unix:///Users/user/.colima/docker.sock
output of
env | grep DOCKER_HOST
should be> env | grep DOCKER_HOST DOCKER_HOST=unix:///Users/user/.colima/docker.sock
if this all doesn't point to colima, set the
DOCKER_HOST
, which is only active for the current shell where you're working in.
@tomdevroomen I set up everything exactly as explained in your reply, but I'm still getting ORA-12547: TNS:lost contact
.
from oci-oracle-xe.
Hi, may I ask for your help? I got * at the end of colima but I still not error " ERROR:
ORA-12541: TNS:no listener" could you help me to solve this problem? I used M1 Chip.
I thank you in advance
from oci-oracle-xe.
Based on this new image: oracle/docker-images#1951 (comment)
Is there a chance we would get it ?
They also stated : " container-registry.oracle.com/database/enterprise:19.19.0.0 is only built for linux/arm64 currently."
from oci-oracle-xe.
Related Issues (20)
- The last commit broke the Github Actions HOT 3
- ORA 28040 No matching Authentication Protocol HOT 1
- Unable to start container HOT 1
- ORA-00443: background process "PMON" did not start HOT 1
- Permission denied on Github Workflow HOT 4
- ORA-43853: SECUREFILE LOBs (Large Objects) cannot be used in non-automatic segment space management tablespace "SYSTEM" HOT 3
- Missing double-quotes for APP_USER HOT 3
- Provide `FREE` SID (together with current `XE`) HOT 7
- Multi-schema DB Access HOT 3
- docker image 21-slim-faststart has an outdated healthcheck.sh HOT 5
- Trying to run gvenzl/Oracle-XE image From a Synology 920 DSM Container HOT 3
- error after restarting container
- Apple silicon support HOT 3
- Mac M2 Oracle-XE, both latest and 18.4.0, does not start, ORA-03113: end-of-file on communication channel HOT 4
- Running Oracle as sibling / child container in podman - Oracle database startup failing HOT 3
- Do you have the image 19c-slim HOT 2
- can i change oracle xe 11g NLS_LANG to other HOT 1
- tar with extended attributes issue HOT 7
- Hope add 12c and 19c HOT 1
- Starting docker image with different owner HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oci-oracle-xe.