Team member was fighting trying to get a docker container for Oracle setup on his Mac as there's a lot of confusing and conflicting information out there. This was tried and tested!
You will need to aquire access to the container via the standard Oracle data grab here.
$ docker login Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one. Username (17twenty): Password: Login Succeeded $ docker pull store/oracle/database-enterprise:18.104.22.168 # This will take an age ... $ docker run -d -it --name oracleDB -p 1521:1521 -p 5500:5500 store/oracle/database-enterprise:22.214.171.124 $ You can specify a config to override all the Oracle defaults but let's start with a working setup first.
sqlplus and support bins from Oracle's site - http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html
I grabbed some creds from bugmenot (no, I didn't make this part up):
Username: email@example.com Password: FUoracle1
You'll need to install the following with brew:
Move them to
$ brew tap InstantClientTap/instantclient $ brew install instantclient-basic $ brew install instantclient-sqlplus
You'll need a file called
tnsnames.ora in a folder, say
oracle. It should look like this:
$ less oracle/tnsnames.ora ORCLCDB=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)) (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCLCDB.localdomain))) ORCLPDB1=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)) (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCLPDB1.localdomain)))
$ export TNS_ADMIN=./oracle $ sqlplus sys/Oradoc_db1@ORCLCDB as sysdba SQL*Plus: Release 126.96.36.199.0 Production on Thu Aug 9 13:45:39 2018 Copyright (c) 1982, 2017, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 188.8.131.52.0 - 64bit Production SQL>
Oradoc_db1 is the default password, you can change this nonsense with a config passed in. The Oracle doco on Docker hub can expand more.