Sign inSign up

paddan66/oracle-xe

By paddan66

•Updated over 7 years ago

Docker image for Oracle Database 18c Express Edition (XE)

Image
0

1.1K

paddan66/oracle-xe repository overview

⁠Docker image for Oracle Database 18c Express Edition (XE)

Created from fuzziebrain/docker-oracle-xe⁠

⁠Run Container

Note: first run will take a a while due to the oracle-xe configure script that needs to complete

docker run -d \
  -p 32118:1521 \
  -p 35518:5500 \
  --name=oracle-xe \
  --volume ~/docker/oracle-xe:/opt/oracle/oradata \
  paddan66/oracle-xe
  
# As this takes a long time to run you can keep track of the initial installation by running:
docker logs oracle-xe

Run parameters:

NameRequiredDescription
-p 1521RequiredTNS Listener. 32118:1521 maps 32118 on your laptop to 1521 on the container.
-p 5500OptionalEnterprise Manager (EM) Express. 35518:5500 maps 35518 to your laptop to 5500 on the container. You can then access EM via https://localhost:35518/em⁠
--nameOptionalName of container. Optional but recommended
--volume /opt/oracle/oradataOptional(recommended) If provided, data files will be stored here. If the container is destroyed can easily rebuild container using the data files.
--networkOptionalIf other containers need to connect to this one (ex: ORDS⁠) then they should all be on the same docker network.
oracle-xe:18cRequiredThis is the name:tag of the docker image that was built in the previous step

⁠Container Commands

# Status:
# Look under the STATUS column for "(health: ...".
docker ps

# Start container
docker start oracle-xe

# Stop container
docker stop -t 200 oracle-xe

⁠Other

⁠SQL

Note sqlcl is an alias for SQLcl⁠. Can also use sqlplus

-- Connect to CDB
sqlcl system/Oracle18@localhost:32118/XE as sysdba


-- Connect to default PDB
sqlcl system/Oracle18@localhost:32118/XEPDB1 as sysdba
⁠SSH into Container

In some cases you may need to login to the server to modify or test something on the file system.

docker exec -it oracle-xe bash -c "source /home/oracle/.bashrc; bash"

# Once connected to run sqlplus:
$ORACLE_HOME/bin/sqlplus system/Oracle18@localhost/XE as sysdba
$ORACLE_HOME/bin/sqlplus system/Oracle18@localhost/XEPDB1 as sysdba


# Listener start/stop
$ORACLE_HOME/bin/lsnrctl stop
$ORACLE_HOME/bin/lsnrctl start

Tag summary

Content type

Image

Digest

Size

5.3 GB

Last updated

over 7 years ago

docker pull paddan66/oracle-xe