Skip to content

Commit

Permalink
Add Docker Compose scripts for Oracle 11g and 18
Browse files Browse the repository at this point in the history
  • Loading branch information
sualeh committed Sep 11, 2021
1 parent af801c2 commit 08d9b87
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
23 changes: 21 additions & 2 deletions schemacrawler-docker-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,36 @@

### Setup

#### Oracle 18

- To start SchemaCrawler with Oracle, run
`docker-compose -f schemacrawler.yml -f oracle.yml up -d`
- Create a test Oracle database schema, run
`docker exec -it schemacrawler ./testdb/createtestschema.sh --url "jdbc:oracle:thin:@//oracle:1521/xe" --user system --password oracle --scripts-resource /oracle-11g.scripts.txt --debug`
`docker exec -it schemacrawler ./testdb/createtestschema.sh --url "jdbc:oracle:thin:@//oracle:1521/xepdb1" --user "SYS AS SYSDBA" --password test --scripts-resource /oracle.scripts.txt --debug`

#### Oracle 11

- To start SchemaCrawler with Oracle, run
`docker-compose -f schemacrawler.yml -f oracle-11g.yml up -d`
- Create a test Oracle database schema, run
`docker exec -it schemacrawler ./testdb/createtestschema.sh --url "jdbc:oracle:thin:@oracle:1521:xe" --user "SYS AS SYSDBA" --password test --scripts-resource /oracle-11g.scripts.txt --debug`

### Testing

#### Oracle 18

- Start SchemaCrawler bash with
`docker exec -it schemacrawler /bin/bash`
- Run SchemaCrawler from Docker container bash
`schemacrawler --server oracle --host oracle --database xepdb1 --user "SYS AS SYSDBA" --password test --info-level minimum -c list`
- Output can be created with `--output-file output/out.txt`

#### Oracle 11

- Start SchemaCrawler bash with
`docker exec -it schemacrawler /bin/bash`
- Run SchemaCrawler from Docker container bash
`schemacrawler --server oracle --host oracle --database xe --user system --password oracle --info-level minimum -c list`
`schemacrawler --url "jdbc:oracle:thin:@oracle:1521:xe" --user "SYS AS SYSDBA" --password test --info-level minimum -c list`
- Output can be created with `--output-file output/out.txt`

### Tear Down
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ version: '3.7'
services:

oracle:
image: store/oracle/database-enterprise:12.2.0.1-slim
# https://hub.docker.com/r/gvenzl/oracle-xe
image: gvenzl/oracle-xe:11-slim
container_name: oracle
ports:
- target: 1521
published: 1521
protocol: tcp
mode: host
environment:
ORACLE_PASSWORD: test
6 changes: 4 additions & 2 deletions schemacrawler-docker-compose/oracle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ version: '3.7'
services:

oracle:
# https://github.com/wnameless/docker-oracle-xe-11g
image: wnameless/oracle-xe-11g-r2
# https://hub.docker.com/r/gvenzl/oracle-xe
image: gvenzl/oracle-xe:18-slim
container_name: oracle
ports:
- target: 1521
published: 1521
protocol: tcp
mode: host
environment:
ORACLE_PASSWORD: test

0 comments on commit 08d9b87

Please sign in to comment.