Skip to content

Instantly share code, notes, and snippets.

@fedemengo
Last active March 7, 2021 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fedemengo/95b4a01612259024474d85bee174c844 to your computer and use it in GitHub Desktop.
Save fedemengo/95b4a01612259024474d85bee174c844 to your computer and use it in GitHub Desktop.
Docker Oracle SQL Server + Oracle SQL Developer

Create local data directory

Since we might run and stop several containers, we want to at least keep the data

mkdir workspace/oracle
chmod ugo+rwx -R workspace/oracle

Run docker container

docker run -d -it -p 1512:1512 -v $HOME/workspace/oracle/:/ORCL store/oracle/database-enterprise:12.2.0.1-slim

Get a bash shell

docker exec -it CONTAINER_ID bash

Log in as sys admin and create test user

sqlplus sys/Oradoc_db1@ORCLCDB as sysdba

SQL> alter session set "_ORACLE_SCRIPT"=true;
SQL> create user test identified by testpass;
SLQ> grant dba to test;
SQL> quit

Remove all volumes when necessary

docker system prune --volumes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment