By Nikesh Gogia, Solution Architect
This tutorial is targeted for any organization that wants to host Oracle 12c on Alibaba Cloud using Docker containers. This document can be used by Solution Architects or Business Development teams for proof of concept (POC) of any customer requirement and gradually can be converted into production grade hosting.
With more than 500 new features, Oracle Database 12c is designed to give Oracle customers need for cloud computing, big data, security, and availability. Since Docker is the open source container software that packages applications in containers allowing them to be portal among systems running on Linux. Since Oracle has released the Docker image of Oracle 12 c and Alibaba Cloud has both Container and Linux VM's this helps to adopt oracle database 12c on Alibaba Cloud.
The Docker installation package available in the official Ubuntu 16.04 repository may not be the latest version. To get the latest and greatest version, install Docker from the official Docker repository. This section shows you how to do just that.
First, add the GPG key for the official Docker repository to the system:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Add the Docker repository to APT sources:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release-cs) stable"
Next, update the package database with the Docker packages from the newly added repo:
sudo apt-get update
Make sure you are about to install from the Docker repo instead of the default Ubuntu 16.04 repo:
apt-cache policy docker-ce
You should see output similar to the follow:
Output of apt-cache policy docker-ce docker-ce: Installed: (none) Candidate: 17.03.1~ce-0~ubuntu-xenial Version table: 17.03.1~ce-0~ubuntu-xenial 500 500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages 17.03.0~ce-0~ubuntu-xenial 500 500 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
Notice that docker-ce is not installed, but the candidate for installation is from the Docker repository for Ubuntu 16.04. The docker-ce version number might be different.
Finally, install Docker:
sudo apt-get install -y docker-ce
Docker should now be installed, the daemon started, and the process enabled to start on boot. Check that it's running:
sudo systemctl status docker
The output should be similar to the following, showing that the service is active and running:
docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2016-05-01 06:53:52 CDT; 1 weeks 3 days ago Docs: https://docs.docker.com Main PID: 749 (docker)
Login to Docker Store with your credentials on above created VM
$ docker login $ docker pull store/oracle/database-enterprise:184.108.40.206 $ docker run -d -it --name db1 -P store/oracle/database-enterprise:220.127.116.11
Once you do the following, you will see below output when you run docker images and docker ps –a commands.
root@iZt4neefbpoojkuy4fdvqzZ:~# docker images REPOSITORY TAG IMAGE ID CREATED SIZE store/oracle/database-enterprise 18.104.22.168 12a359cd0528 2 months ago 3.44GB root@iZt4neefbpoojkuy4fdvqzZ:~# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 92997757be9e store/oracle/database-enterprise:22.214.171.124 "/bin/sh -c '/bin/..." 39 hours ago Up 39 hours (healthy) 0.0.0.0:32775->1521/tcp, 0.0.0.0:32774->5500/tcp db1
Congratulations! You have successfully configured a Docker image on Alibaba Cloud VM Container.
Make sure you have Oracle Client installed on your client machine. You can install it from the following link: http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
Make sure you install and you have the PATH variable set where you can execute sqlplus command
Nikeshs-MacBook-Pro:~ nikeshgogia$ export PATH=$PATH:/Users/nikeshgogia/Downloads/instantclient_12_2 Nikeshs-MacBook-Pro:~ nikeshgogia$ sqlplus
nikeshgogia$ sqlplus sys/Oradoc_db1@126.96.36.199:32775/ORCLCDB.localdomain as sysdba
You will see the output as below and you will get Connection Developed.
Note: In the above command,
sys/Oradoc_db1@188.8.131.52:32775, sys has the username Oradoc_db1 is password and port is 32775. Make sure you open this port in your security Group and the IP 47.74… is a public IP. Additionally, you need to make sure you keep
ORCLCDB.localdomain as service name as it is.
Nikeshs-MacBook-Pro:~ nikeshgogia$ sqlplus sys/Oradoc_db1@184.108.40.206:32775/ORCLCDB.localdomain as sysdba SQL*Plus: Release 220.127.116.11.0 Production on Sat Oct 28 11:16:44 2017 Copyright (c) 1982, 2017, Oracle. All rights reserved. Last Successful login time: Thu Oct 26 2017 21:50:32 +05:30 Connected to: Oracle Database 12c Enterprise Edition Release 18.104.22.168.0 - 64bit Production SQL>
With this we conclude that Alibaba Cloud is capable of hosting Oracle 12c. By running Oracle on Alibaba Cloud Container Service or ECS servers, you can enjoy the latest cloud enabled database with stable and advanced features.
Alibaba Clouder - October 18, 2018
Alibaba Container Service - July 16, 2019
Alibaba Clouder - December 20, 2017
Alibaba Clouder - February 13, 2018
Alibaba Cloud Storage - June 4, 2019
Alibaba Cloud Blockchain Service Team - October 25, 2018
An online computing service that offers elastic and secure virtual cloud servers to cater all your cloud hosting needs.Learn More
A high-performance container manage service that provides containerized application lifecycle managementLearn More
An on-demand database hosting service for MySQL, SQL Server and PostgreSQL with automated monitoring, backup and disaster recovery capabilitiesLearn More
More Posts by Alibaba Clouder