Docker Combat---Using Oracle XE as a development database (vi)

Source: Internet
Author: User
Tags docker run

Oracle is the big guy for OLTP, and it's used by many industry applications. So in the process of development of the inevitable use of Oracle database, Oracle database version has a lot of, where the Express version is a free development version, its main limitation is the size of the database maximum 1G, and some performance limitations, so it is more appropriate to take the development.

Here's how to use the Oracle-loaded Docker container for development:

First, let's introduce the image of Docker-oracle, which was installed on Ubuntu based on the Oracle XE version.

Its docker file is as follows:

From Wnameless/xe-tempmaintainer Alexei Ledenev <[email protected]>add chkconfig/sbin/chkconfigadd Init.ora/add initxetemp.ora/run apt-get install-y libaio1 net-tools bcrun ln-s/usr/bin/awk/bin/awkrun mkdir/var/loc K/subsysrun chmod 755/sbin/chkconfigrun ln-s/proc/mounts/etc/mtabrun dpkg--install/tmp/oracle-xe_11.2.0-1.0_ Amd64.debrun Mv/init.ora/u01/app/oracle/product/11.2.0/xe/config/scriptsrun mv/initxetemp.ora/u01/app/oracle/ Product/11.2.0/xe/config/scriptsrun printf 8080\\n1521\\noracle\\noracle\\ny\\n | /etc/init.d/oracle-xe configurerun echo ' export oracle_home=/u01/app/oracle/product/11.2.0/xe ' >>/etc/ Bash.bashrcrun echo ' Export path= $ORACLE _home/bin: $PATH ' >>/etc/bash.bashrcrun echo ' Export Oracle_sid=xe ' >& Gt /etc/bash.bashrcexpose 22EXPOSE 1521EXPOSE 8080CMD sed-i-E "s/host = [^)]+/host = $HOSTNAME/g"/u01/app/oracle/product/1     1.2.0/xe/network/admin/listener.ora;     Service Oracle-xe start; /usr/sbin/sshd-d

The main purpose of putting on this dockerfile is to see how it was created.

Then pull an image that already has the Oracle XE installed.

Docker Pull alexeiled/docker-oracle-xe-11g


Launch an Oracle container with the newly downloaded image, open 22 1521 8080 port

Docker run-d-P 22:22-p 1521:1521-p 8080:8080 alexeiled/docker-oracle-xe-11g

Here are some basic information about the containers:

Oracle
Sid Xe
System Oracle
Operating system:
Root Admin

So that we can use this container for development, such as a project that requires 3 Oracle servers:

Docker run-d-P 101:22-p 1521:1521-p 8080:8080--name oracle1 alexeiled/docker-oracle-xe-11g

Docker run-d-P 102:22-p 1522:1521-p 8081:8080--name oracle2 alexeiled/docker-oracle-xe-11g

Docker run-d-P 103:22-p 1523:1521-p 8082:8080--name oracle3 alexeiled/docker-oracle-xe-11g

The startup script can also be simply written as Docker start Oracle1 oracle2 oracle3

This can be useful for quickly building a development environment with Oracle.

Docker Combat---Using Oracle XE as a development database (vi)

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.