-
Docker - Oracle 12c 설치OS/Docker 2018. 10. 29. 14:28반응형
Oralce 12C를 설치할 디렉토리 생성 및 권한 변경
mkdir vm_ora12c
chmod -R a+w vm_ora12cOracle 12c 이미지 조회
docker search oracle
[docker_test@blue ~]$ docker search oracle
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
docker.io docker.io/oraclelinux Official Docker builds of Oracle Linux. 515 [OK]
docker.io docker.io/sath89/oracle-12c Oracle Standard Edition 12c Release 1 with... 409 [OK]
docker.io docker.io/frolvlad/alpine-oraclejdk8 The smallest Docker image with OracleJDK 8... 343 [OK]
docker.io docker.io/alexeiled/docker-oracle-xe-11g This is a working (hopefully) Oracle XE 11... 273 [OK]
docker.io docker.io/sath89/oracle-xe-11g Oracle xe 11g with database files mount su... 224 [OK]
docker.io docker.io/wnameless/oracle-xe-11g Dockerfile of Oracle Database Express Edit... 115 [OK]
docker.io docker.io/jaspeen/oracle-11g Docker image for Oracle 11g database 77 [OK]
docker.io docker.io/isuper/java-oracle This repository contains all java releases... 55 [OK]
docker.io docker.io/oracle/openjdk Docker images containing OpenJDK Oracle Linux 49 [OK]
docker.io docker.io/airdock/oracle-jdk Docker Image for Oracle Java SDK (8 and 7)... 39 [OK]
docker.io docker.io/sath89/oracle-ee-11g Dockerfile of Oracle Database Enterprise E... 34 [OK]
docker.io docker.io/cogniteev/oracle-java Oracle JDK 6, 7, 8, and 9 based on Ubuntu ... 24 [OK]
docker.io docker.io/ingensi/oracle-jdk Official Oracle JDK installed on centos. 21 [OK]
docker.io docker.io/oracle/nosql Oracle NoSQL on a Docker Image with Oracle... 17 [OK]
docker.io docker.io/n3ziniuka5/ubuntu-oracle-jdk Ubuntu with Oracle JDK. Check tags for ver... 16 [OK]
docker.io docker.io/sgrio/java-oracle Docker images of Java 7/8/9/10 provided by... 16 [OK]
docker.io docker.io/andreptb/oracle-java Debian Jessie based image with Oracle JDK ... 7 [OK]
docker.io docker.io/flurdy/oracle-java7 Base image containing Oracle's Java 7 JDK 5 [OK]
docker.io docker.io/davidcaste/debian-oracle-java Oracle Java 8 (and 7) over Debian Jessie 4 [OK]
docker.io docker.io/martinseeler/oracle-server-jre Oracle's Java 8 as 61 MB Docker container. 4 [OK]
docker.io docker.io/teradatalabs/centos6-java8-oracle Docker image of CentOS 6 with Oracle JDK 8... 4
docker.io docker.io/publicisworldwide/oracle-core This is the core image based on Oracle Lin... 1 [OK]
docker.io docker.io/bitnami/oraclelinux-extras Oracle Linux base images 0 [OK]
docker.io docker.io/pivotaldata/oracle7-test Oracle Enterprise Linux (OEL) image for GP... 0
docker.io docker.io/softwareplant/oracle oracle db 0 [OK]Oracle docker image download
docker pull sath89/oracle-12c
[docker_test@blue ~]$ docker pull sath89/oracle-12c
Using default tag: latest
Trying to pull repository docker.io/sath89/oracle-12c ...
latest: Pulling from docker.io/sath89/oracle-12c
863735b9fd15: Pull complete
4fbaa2f403df: Pull complete
44be94a95984: Pull complete
a3ed95caeb02: Pull complete
b8bc6e8767ee: Pull complete
c918da326197: Pull complete
448e1619a038: Pull complete
faadd00cf98e: Downloading [====> ] 266.9 MB/2.768 GB
fab7f453b7c6: Download complete
c98ac63d2108: Download completedownload 된 image 확인
[docker_test@blue ~]$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/sath89/oracle-12c latest ee3351d51185 2 months ago 5.7 GB실행
docker run --name oracle12c -d -p (외부포트):8080 -p (외부포트):1521 -v (외부경로):/u01/app/oracle sath89/oracle-12c
[docker_test@blue ~]$ docker run --name oracle12c -d -p 28080:8080 -p 21521:1521 -v /home/docker_test/vm_ora12c:/u01/app/oracle sath89/oracle-12c
185cb33e3b92b6473c13f35e687b960d42da9e547ceb600e5a181d0ed7fca631실행 로그 확인
docker logs -f oracle12c
[docker_test@blue ~]$ docker logs -f oracle12c
Database not initialized. Initializing database.
Starting tnslsnr
Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
......
ls: cannot access /docker-entrypoint-initdb.d/*: No such file or directory
Import finished
Database ready to use. Enjoy! ;)oracle 의 사용자 계정 생성
docker exec -it oracle12c /bin/bash
su oracle
export PATH=$PATH:$ORACLE_HOME/bin
sqlplus /as sysdba
create user testuser identified by oracle;
grant dba to testuser;
exit (연속)
[docker_test@blue ~]$ docker exec -it oracle12c /bin/bash
root@185cb33e3b92:/# su oracle
oracle@185cb33e3b92:/$ export PATH=$PATH:$ORACLE_HOME/bin
oracle@185cb33e3b92:/$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Mon Oct 29 05:24:43 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
SQL> create user testuser identified by oracle
2 /
User created.
SQL> grant dba to testuser
2 /
Grant succeeded.해당 유저로 접속 확인
docker exec -it oracle12c sqlplus testuser/oracle
[docker_test@blue ~]$ docker exec -it oracle12c sqlplus testuser/oracle
SQL*Plus: Release 12.1.0.2.0 Production on Mon Oct 29 05:26:30 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
SQL>반응형'OS > Docker' 카테고리의 다른 글
CentOS7 - Docker CE 설치 (0) 2018.10.30 Docker 사용시 Permision denied 발생 (0) 2018.10.29 CentOS 7 - Docker install (0) 2018.10.29