We often need install Oracle database for development environment. This process normally will take many time, especially on Linux OS. It becomes quite more convenient after we have docker.
1. Search out a Oracle database image on Docker Hub
Go to https://hub.docker.com/
Type oracle, enter. Then find a oracle with most amount of users. I choose wnameless/oracle-xe-11g, it has many users already and oralce xe is also already enough for development.
Go in this image, there are detailed description, how to pull it, how to startup ..., all in it.
2. Pull
Open docker quick start terminal and type in
$ docker pull wnameless/oracle-xe-11g
3. Run
$ docker run -d -p 49160:22 -p 49161:1521 wnameless/oracle-xe-11g
-d - Image run in detached mode exit.
-p - expose container port with mapping port.
4. Process Status
To check process status of oracle xe.
$ docker ps
5. Get VM IP Adress
$ docker-machine ls
Noted 192.168.99.100
Follow the instruction in wnameless/oracle-xe-11g respository.
6. ssh oracle-xe-11g container
Open a new terminal.
$ ssh root@192.168.99.100 -p 49160