docker安装oracle 12c
1、查找oracle镜像
[root@localhost ~]# docker search oracle NAME DESCRIPTION STARS OFFICIAL AUTOMATED oraclelinux Official Docker builds of Oracle Linux. 631 [OK] jaspeen/oracle-11g Docker image for Oracle 11g database 148 [OK] oracleinanutshell/oracle-xe-11g 83 oracle/openjdk Docker images containing OpenJDK Oracle Linux 60 [OK] oracle/graalvm-ce GraalVM Community Edition Official Image 57 [OK] absolutapps/oracle-12c-ee Oracle 12c EE image with web management cons… 38 araczkowski/oracle-apex-ords Oracle Express Edition 11g Release 2 on Ubun… 27 [OK] bofm/oracle12c Docker image for Oracle Database 23 [OK] oracle/nosql Oracle NoSQL on a Docker Image with Oracle L… 23 [OK] datagrip/oracle Oracle 11.2 & 12.1.0.2-se2 & 11.2.0.2-xe 14 [OK] oracle/weblogic-kubernetes-operator Docker images containing the Oracle WebLogic… 10 truevoly/oracle-12c Copy of sath89/oracle-12c image (https://git… 9 openweb/oracle-tomcat A fork off of Official tomcat image with Ora… 8 [OK] 18fgsa/oracle-client Hosted version of the Oracle Container Image… 2 softwareplant/oracle oracle db 2 [OK] iamseth/oracledb_exporter A Prometheus exporter for Oracle modeled aft… 2 paulosalgado/oracle-java8-ubuntu-16 Oracle Java 8 on Ubuntu 16.04 LTS. 2 [OK] roboxes/oracle7 A generic Oracle Linux 7 base image. 1 publicisworldwide/oracle-core This is the core image based on Oracle Linux… 1 [OK] bitnami/oraclelinux-extras Oracle Linux base images 0 [OK] pivotaldata/oracle7-test Oracle Enterprise Linux (OEL) image for GPDB… 0 toolsmiths/oracle7-test 0 bitnami/oraclelinux-runtimes Oracle Linux runtime-optimized images 0 [OK] arm64v8/oraclelinux Official Docker builds of Oracle Linux. 0 amd64/oraclelinux Official Docker builds of Oracle Linux. 0
2、拉取镜像
docker pull absolutapps/oracle-12c-ee
3、启动镜像
[root@localhost ~]# docker run -d --name oracle1 -p 8080:8080 -p 1521:1521 absolutapps/oracle-12c-ee
c8e8eae9f2690a9445575211eb23280e2f85559258774b3f28585cc977feebc0
4、进入镜像系统
docker exec -it c8e8eae9f2690a9445575211eb23280e2f85559258774b3f28585cc977feebc0 /bin/bash
[root@c8e8eae9f269 /]#
5、连接数据库
[root@c8e8eae9f269 /]# sqlplus system/oracle@//localhost:1521/orcl SQL*Plus: Release 12.1.0.2.0 Production on Tue Feb 18 01:48:32 2020 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL>
6、清理属于终止状态的容器
列出容器
[root@localhost ~]# docker container ls -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
75dc4c479379 absolutapps/oracle-12c-ee "/entrypoint.sh" 10 hours ago Exited (1) 10 hours ago oracle1
50a35309e1c9 absolutapps/oracle-12c-ee "/entrypoint.sh" 11 hours ago Exited (137) 10 hours ago oracle
删除容器
docker container rm +CONTAINER ID
7、SQL Developer新建连接
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
· DeepSeek “源神”启动!「GitHub 热点速览」
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· C# 集成 DeepSeek 模型实现 AI 私有化(本地部署与 API 调用教程)
· DeepSeek R1 简明指南:架构、训练、本地部署及硬件要求
· 2 本地部署DeepSeek模型构建本地知识库+联网搜索详细步骤