安装deepdiver/docker-oracle-xe-11g
registry.hub.docker.com/r/deepdiver…
# sudo docker pull deepdiver/docker-oracle-xe-11g
Using default tag: latest
latest: Pulling from deepdiver/docker-oracle-xe-11g
Image docker.io/deepdiver/docker-oracle-xe-11g:latest uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
a3ed95caeb02: Download complete
a3ed95caeb02: Pull complete
f94adccdbb9c: Pull complete
ee950bf8af06: Pull complete
eec0023b823a: Pull complete
2bbcf2933a57: Pull complete
1d639c2160a1: Pull complete
2631aa3055c3: Pull complete
d859f4b0261f: Pull complete
344fe8edcc0a: Pull complete
48fec8d59976: Pull complete
c9c81ef7960f: Pull complete
7e928eb7228a: Pull complete
56e977b47ad6: Pull complete
5c896b34601c: Pull complete
bcab6dcbd345: Pull complete
42e031cc37c0: Pull complete
fd6c6b47d0ba: Pull complete
546a383ffbe3: Pull complete
5acead7005d0: Pull complete
206b7448a401: Pull complete
bdf584565438: Pull complete
4ce7a34d8c4b: Pull complete
8702b3ee1143: Pull complete
777d696e58cd: Pull complete
8271d90e318b: Pull complete
c0e2d1590154: Pull complete
aeb67e38d18e: Pull complete
Digest: sha256:30c9b1f61397bbca016c25b21c4c2e5399af225306e41272874411ae2bd741d3
Status: Downloaded newer image for deepdiver/docker-oracle-xe-11g:latest
docker.io/deepdiver/docker-oracle-xe-11g:latest
查看安装好的oracle镜像
# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mysql 5.7.32 f07dfa83b528 2 weeks ago 448MB
hello-world latest bf756fb1ae65 12 months ago 13.3kB
deepdiver/docker-oracle-xe-11g latest 396b3e06a5dc 5 years ago 2.7GB
运行
开放端口49160
和49161
# docker run -d -p 49160:22 -p 49161:1521 deepdiver/docker-oracle-xe-11g
235bb3f68c30271285de634c4837e4d10eaec0e9c634f0adea7e54b3fc0c8270
查看
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
235bb3f68c30 deepdiver/docker-oracle-xe-11g "/bin/sh -c 'sed -i …" 29 minutes ago Up 29 minutes 8080/tcp, 0.0.0.0:49160->22/tcp, 0.0.0.0:49161->1521/tcp quizzical_nash
连接数据库信息
hostname: localhost
port: 49161
sid: xe
username: system
password: oracle
默认账号SYS和SYSTEM的密码
oracle
进入容器
- 方法1
docker exec -it 容器名name或id /bin/bash
# docker exec -it quizzical_nash /bin/bash
root@235bb3f68c30:/#
- 方法2
ssh root@localhost -p 49160
ssh root@localhost -p 49160
password: admin
# ssh root@localhost -p 49160
The authenticity of host '[localhost]:49160 ([127.0.0.1]:49160)' can't be established.
ECDSA key fingerprint is SHA256:UbSxjBzIcpWHospUr4RVW5BB1ciOqsTqzJ/cCbzUXhE.
ECDSA key fingerprint is MD5:dc:b0:9e:58:7c:96:d8:4d:2d:9e:ae:60:54:75:26:8e.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added '[localhost]:49160' (ECDSA) to the list of known hosts.
root@localhost's password:
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.2.0-70-generic x86_64)
* Documentation: https://help.ubuntu.com/
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
root@235bb3f68c30:~#
远程连接
今天的文章Docker和Oracle的情缘分享到此就结束了,感谢您的阅读。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/21160.html