Oracle Adf & Docker – How to run Oracle XE Database in Docker container

Oracle Adf & Docker – How to run Oracle XE Database in Docker container

The time is one of the most valuable goods which you can control. On the other hand, saving the time means that you can spend it on something else. In this post I’ll show you how you can save some time using Docker containers. Are you ready?


Requirements

 

Docker installation

 

sudo apt-get update
sudo apt-get install docker.io

Permissions

To enable the user to manage containers, add him to the docker  group. You have to re-login for the changes to take effect.

sudo usermod -aG docker better-coding

Downloading database Docker image

Make sure that Oracle XE 11g Database Docker image is available on Docker Hub or you can search it using command:

docker search oracle-xe

And the just pull the image.

docker pull alexeiled/docker-oracle-xe-11g

Create database

You can create as many containers as you want. The script below creates two docker containers with oracle XE 11g database. Please notice that I used different names and exposed ports for containers.

docker create --name oracle-xe-db1 --shm-size=2g -p 10021:1521 -p 10081:8080 alexeiled/docker-oracle-xe-11g
docker create --name oracle-xe-db2 --shm-size=2g -p 10022:1521 -p 10082:8080 alexeiled/docker-oracle-xe-11g

Manage containers

Starting Oracle XE 11g docker container:

docker start oracle-xe-db1

Stopping Oracle XE 11g docker container:

docker stop oracle-xe-db1

Renaming Oracle XE 11g docker container:

docker rename oracle-xe-db1 oracle-xe-renamed

Removing Oracle XE 11g docker container:

docker rename oracle-xe-db1 oracle-xe-renamed

3
Leave a Reply

avatar
3 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
0 Comment authors
Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
trackback

[…] the purposes of this tutorial I’ll use an application from my previous post, where I showed you how to create simple ADF application which use Oracle Database Express Edition […]

trackback

[…] first, make sure you have docker installed correctly (here you can find how to properly install docker on linux OS). Install docker-compose tool by running […]

trackback

[…] Oracle Adf & Docker – How to run Oracle XE Database in Docker container […]

Close Menu