Skip to content

Commit b16728a

Browse files
committed
Upgrade Ubuntu to 18.04 and remove SSH server
1 parent f65628e commit b16728a

File tree

3 files changed

+18
-27
lines changed

3 files changed

+18
-27
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:18.04
22

33
MAINTAINER Wei-Ming Wu <[email protected]>
44

@@ -9,4 +9,4 @@ EXPOSE 22
99
EXPOSE 1521
1010
EXPOSE 8080
1111

12-
CMD /usr/sbin/startup.sh && /usr/sbin/sshd -D
12+
CMD /usr/sbin/startup.sh && tail -f /dev/null

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,41 @@
11
docker-oracle-xe-11g
22
============================
33

4-
Oracle Express Edition 11g Release 2 on Ubuntu 16.04 LTS
4+
Oracle Express Edition 11g Release 2 on Ubuntu 18.04 LTS
55

66
This **Dockerfile** is a [trusted build](https://registry.hub.docker.com/u/wnameless/oracle-xe-11g/) of [Docker Registry](https://registry.hub.docker.com/).
77

8-
## Installation(with Ubuntu 16.04)
8+
## Installation(with Ubuntu 18.04)
99
```
1010
docker pull wnameless/oracle-xe-11g
1111
```
12+
SSH server has been removed since 18.04, please use "docker exec" or 16.04 instead.
13+
14+
## Installation(with Ubuntu 16.04)
15+
```
16+
docker pull wnameless/oracle-xe-11g:16.04
17+
```
1218

1319
## Quick Start
1420

15-
Run with 22 and 1521 ports opened:
21+
Run with 1521 port opened:
1622
```
17-
docker run -d -p 49160:22 -p 49161:1521 wnameless/oracle-xe-11g
23+
docker run -d -p 49161:1521 wnameless/oracle-xe-11g
1824
```
1925

2026
Run this, if you want the database to be connected remotely:
2127
```
22-
docker run -d -p 49160:22 -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true wnameless/oracle-xe-11g
28+
docker run -d -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true wnameless/oracle-xe-11g
2329
```
2430

2531
For performance concern, you may want to disable the disk asynch IO:
2632
```
27-
docker run -d -p 49160:22 -p 49161:1521 -e ORACLE_DISABLE_ASYNCH_IO=true wnameless/oracle-xe-11g
33+
docker run -d -p 49161:1521 -e ORACLE_DISABLE_ASYNCH_IO=true wnameless/oracle-xe-11g
2834
```
2935

3036
For XDB user, run this:
3137
```
32-
docker run -d -p 49160:22 -p 49161:1521 -p 8080:8080 -e ORACLE_ENABLE_XDB=true wnameless/oracle-xe-11g
38+
docker run -d -p 49161:1521 -p 8080:8080 -e ORACLE_ENABLE_XDB=true wnameless/oracle-xe-11g
3339
```
3440

3541
Check if localhost:8080 work
@@ -66,12 +72,6 @@ Password for SYS & SYSTEM
6672
oracle
6773
```
6874

69-
Login by SSH
70-
```
71-
ssh root@localhost -p 49160
72-
password: admin
73-
```
74-
7575
Support custom DB Initialization
7676
```
7777
# Dockerfile

assets/setup.sh

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,16 @@
33
# avoid dpkg frontend dialog / frontend warnings
44
export DEBIAN_FRONTEND=noninteractive
55

6-
cat /assets/oracle-xe_11.2.0-1.0_amd64.deba* > /assets/oracle-xe_11.2.0-1.0_amd64.deb
7-
8-
# Install OpenSSH
9-
apt-get update &&
10-
apt-get install -y openssh-server &&
11-
mkdir /var/run/sshd &&
12-
echo 'root:admin' | chpasswd &&
13-
sed -i 's/^PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config &&
14-
sed -i 's/session\s*required\s*pam_loginuid.so/session optional pam_loginuid.so/g' /etc/pam.d/sshd &&
15-
echo 'export VISIBLE=now' >> /etc/profile &&
16-
176
# Prepare to install Oracle
7+
apt-get update &&
188
apt-get install -y libaio1 net-tools bc &&
199
ln -s /usr/bin/awk /bin/awk &&
2010
mkdir /var/lock/subsys &&
2111
mv /assets/chkconfig /sbin/chkconfig &&
2212
chmod 755 /sbin/chkconfig &&
2313

2414
# Install Oracle
15+
cat /assets/oracle-xe_11.2.0-1.0_amd64.deba* > /assets/oracle-xe_11.2.0-1.0_amd64.deb &&
2516
dpkg --install /assets/oracle-xe_11.2.0-1.0_amd64.deb &&
2617

2718
# Backup listener.ora as template
@@ -47,7 +38,7 @@ rm -r /assets/ &&
4738
# Create initialization script folders
4839
mkdir /docker-entrypoint-initdb.d
4940

50-
# Disable password expiration
41+
# Disable Oracle password expiration
5142
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
5243
export PATH=$ORACLE_HOME/bin:$PATH
5344
export ORACLE_SID=XE

0 commit comments

Comments
 (0)