Quickly deploy Oracle environments with Docker

Source: Internet
Author: User
Tags glassfish docker ps docker run

The Oracle environment is frequently used at work, but each time it is set up, it is time-consuming to install the Oracle VM in a virtual machine template, but the environment, such as IP every time, is time intensive, so think of the images that has been done in Docker, This gives you a quick access to Oracle environments.

[Email protected] Rac1:docker search Oracle

INDEX NAME DESCRIPTION STARS Official automated

Docker.io docker.io/wnameless/oracle-xe-11g Oracle Express 11g R2 on Ubuntu 16.04 LTS 417 [OK]

Docker.io Docker.io/oraclelinux Oracle Linux is an open-source operating s ... 304 [OK]

Docker.io docker.io/alexeiled/docker-oracle-xe-11g This is a working (hopefully) Oracle XE 11 ... 203 [OK]

Docker.io docker.io/sath89/oracle-12c Oracle Standard Edition 12c Release 1 with ... [OK]

Docker.io docker.io/sath89/oracle-xe-11g Oracle XE 11g with database files Mount Su ... [OK]

Docker.io docker.io/isuper/java-oracle This repository contains all Java releases ... [OK]

Docker.io docker.io/jaspeen/oracle-11g Docker image for Oracle 11g database [OK]

Docker.io Docker.io/oracle/oraclelinux Oracle Linux is an Open-source operating s ... [OK]

Docker.io DOCKER.IO/INGENSI/ORACLE-JDK Official Oracle JDK installed on CentOS. [OK]

Docker.io DOCKER.IO/AIRDOCK/ORACLE-JDK Docker Image for Oracle Java SDK (8 and 7) ... [OK]

Docker.io docker.io/oracle/openjdk docker images containing openjdk Oracle Linux [OK]

Docker.io Docker.io/cogniteev/oracle-java Oracle JDK 6, 7, 8, and 9 based on Ubuntu ... [OK]

Docker.io docker.io/n3ziniuka5/ubuntu-oracle-jdk ubuntu with Oracle JDK. Check Tags for ver ... [OK]

Docker.io Docker.io/andreptb/oracle-java Debian Jessie based image with Oracle JDK ... 8 [OK]

Docker.io docker.io/oracle/glassfish glassfish Java EE application Server on Or ... 8 [OK]

Docker.io Docker.io/oracle/nosql Oracle NoSQL on a docker Image with Oracle ... 7 [OK]

Docker.io docker.io/infogene/oracle Image for running Oracle Database 11g Stan ... 6 [OK]

Docker.io docker.io/openweb/oracle-tomcat A Fork off of official Tomcat image with O ... 5 [OK]

Docker.io docker.io/flurdy/oracle-java7 Base image containing Oracle ' s Java 7 JDK 4 [OK]

Docker.io DOCKER.IO/JTECH/ORACLE-JDK A Docker image based on the smallest Linux ... 3 [OK]

Docker.io Docker.io/davidcaste/debian-oracle-java Oracle Java 8 (and 7) over Debian Jessie 2 [OK]

Docker.io docker.io/kaluzki/oracle kaluzki/oracle 2 [OK]

Docker.io docker.io/clincase/oracle clincase Oracle DB server Image 1 [OK]

Docker.io docker.io/jckrz/debian-oracle-jdk Vanilla Debian + oracle JDK 1 [OK]

Docker.io Docker.io/publicisworldwide/oracle-core The core image based on Oracle Lin ... 1 [OK]

You can see that there are many versions, 11g,12c

Choose to get 12c version here

[email protected] rac1:/home/# Docker pull sath89/oracle-12c

Using default Tag:latest

Latest:pulling from sath89/oracle-12c

863735b9fd15:pull Complete

4fbaa2f403df:pull Complete

Faadd00cf98e:downloading [=======>] 394.8 mb/2.768 GB

829e2e754405:download Complete

[email protected] rac1:/home/# Docker images

REPOSITORY TAG IMAGE ID CREATED SIZE

DOCKER.IO/SATH89/ORACLE-12C latest B8BF52883BC7 5 weeks ago 5.692 GB

Create a container with the 12g image you just downloaded and run the Oracle database on it

Docker run-d-P 8080:8080-p 1521:1521-v/my/oracle/data:/u01/app/oracle sath89/oracle-12c

[email protected] ~]# Docker logs-f ffbeb07058449672c640ddb4e59b8376dae2e3b4dd54142871da7adbc069ee79

Ls:cannot access/u01/app/oracle/oradata:no such file or directory

Database not initialized. Initializing database.

Starting Tnslsnr

Copying Database files

1% Complete

37% Complete

Creating and Starting Oracle instance

40% Complete

45% Complete

62% Complete

Completing Database Creation

66% Complete

100% Complete

Look at the log file '/u01/app/oracle/cfgtoollogs/dbca/xe/xe.log ' for further details.

Configuring Apex Console

Database initialized. Please visit/#containeer: 8080/em/#containeer: 8080/apex for extra configuration if needed

Starting Web Management Console

PL/SQL procedure successfully completed.

Starting import from '/DOCKER-ENTRYPOINT-INITDB.D ':

Found file/docker-entrypoint-initdb.d//docker-entrypoint-initdb.d/*

[IMPORT]/entrypoint.sh:ignoring/docker-entrypoint-initdb.d/*

Import finished

Database ready for use. enjoy! ;)

Here the Oracle instance is up and ready.

You can see that the created container is already running

[[email protected] ~]~$ Docker PS

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

9e893d773494 sath89/oracle-12c "/entrypoint.sh", minutes ago up, minutes 0.0.0.0:1521->1521/ TCP, 0.0.0.0:8080->8080/tcp Clever_chandrasekhar

Enter Oracle Container

[email protected] ~]~$ Docker exec-it 9e893d773494/bin/bash

[Email protected]:/# su Oracle

[Email protected]:~$ $ORACLE _home/bin/sqlplus/as SYSDBA

Sql*plus:release 12.1.0.2.0 Production on Fri Feb 24 03:03:00 2017

Copyright (c) 1982, Oracle. All rights reserved.

Sql>

The instance name, user name, and password used by Oracle are as follows

---------------------------------------------

Hostname:localhost

port:1521

Sid:xe

Username:system

Password:oracle

---------------------------------------------

The next step is to quickly use the oracle12c.

Quickly deploy Oracle environments with Docker

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.