第一步:安装阿里云镜像(别的镜像有可能拉取失败,所以最好拉取阿里云镜像)
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
第二步:配置使用阿里云镜像加速器
使用命令进入/etc/docker目录,编辑daemon.json文件,加入以下内容:
{ "registry-mirrors": ["https://md4nbj2f.mirror.aliyuncs.com"] }
第三步:重载配置文件
launchctl list | grep docker
launchctl stop com.docker.docker.3976
第四步:安装docker容器:
docker run -dp 9090:8080 -p 1521:1521 registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
第五步:通过docker ps 命令查看运行的容器中是否有oracle容器
第六步:使用navacat工具新建oracle类型连接看是否可以建立连接:
连接名:自己定义就可以.
类型:默认
host:localhost
端口:1521
服务名:helowin
用户名:system
密码:helowin
以上这些填完后,点击左下方的连接测试,如果提示successfully代表建立连接成功.
你学会了吗?哈哈😄