in Databases, Docker, Linux, Oracle, Windows

Installing Oracle XE with Docker


Nicest way to install Oracle XE on any operating system (for development) is Docker. Docker is an application container for Mac, Linux and Windows. It is based on LXC and gives you the ability to package complete application including their dependencies to a self-containing file (called an image). These images can be exchanged and run on every Linux machine where Docker is installed! Awesome!

Docker images are also shared around the community on https://index.docker.io. And this is where this two guys come into play:

  • Wei-Ming Wu made a Docker image containing Oracle XE. You can find it here.
  • Alexei Ledenev extended Wei-Ming Wu’s image to also use the Oracle web console (APEX). You can find it here.

Both projects work the same:

  1. Install Docker on your machine. You can find instructions for that at https://docs.docker.com/docker-for-mac/. (For other operating systems please see Docker’s official website)
  2. Pull the image to your machine:
  3. Run the image:
  4. That’s it. Absolutely simple.

Additionally, if you want to ssh to your docker container, you can run following commands:

  1. To get container_id:
    docker ps
  2. SSH into your container:
    docker exec -i -t [container_id] /bin/bash

     

The great thing is that those images are not as big as a virtual machine. They only contain the actual application and its environment. But they are packed in a way that they can be executed everywhere right out of the box but are still isolated. You can also make changes to the images and create another image containing your changed system.