Skip to content

Commit 9266ab1

Browse files
committed
Add ORACLE_ALLOW_REMOTE option
Rebuild form Ubuntu 14.04.4
1 parent 0b6485e commit 9266ab1

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:14.04.1
1+
FROM ubuntu:14.04.4
22

33
MAINTAINER Wei-Ming Wu <wnameless@gmail.com>
44

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright [2014] [Wei-Ming Wu]
1+
Copyright 2014 Wei-Ming Wu
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ Run with 22 and 1521 ports opened:
1515
docker run -d -p 49160:22 -p 49161:1521 wnameless/oracle-xe-11g
1616
```
1717

18+
Run this, if you want the database to be connected remotely:
19+
```
20+
docker run -d -p 49160:22 -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true wnameless/oracle-xe-11g
21+
```
22+
1823
Connect database with following setting:
1924
```
2025
hostname: localhost

assets/startup.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
#!/bin/bash
22
LISTENERS_ORA=/u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
33

4-
cp "${LISTENERS_ORA}.tmpl" "$LISTENERS_ORA" &&
5-
sed -i "s/%hostname%/$HOSTNAME/g" "${LISTENERS_ORA}" &&
6-
sed -i "s/%port%/1521/g" "${LISTENERS_ORA}" &&
4+
cp "${LISTENERS_ORA}.tmpl" "$LISTENERS_ORA" &&
5+
sed -i "s/%hostname%/$HOSTNAME/g" "${LISTENERS_ORA}" &&
6+
sed -i "s/%port%/1521/g" "${LISTENERS_ORA}" &&
77

88
service oracle-xe start
9+
10+
if [ "$ORACLE_ALLOW_REMOTE" = true ]; then
11+
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
12+
export PATH=$ORACLE_HOME/bin:$PATH
13+
export ORACLE_SID=XE
14+
echo "alter system disable restricted session;" | sqlplus -s SYSTEM/oracle
15+
fi

0 commit comments

Comments
 (0)