1. 登录Docker官网(www.docker.com)
登录docker商店获取Oracle Database和Weblogic的镜像
$ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: code501
Password:
如果出现:Login Succeeded则登录成功
如果出现:Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password(失败)
解决方法:
- 配置Docker的http代理:https://docs.docker.com/engine/admin/systemd/#httphttps-proxy
- 配置daemon.json
2. Pull database-enterprise Images
# docker pull 10.128.222.245:5000/database-enterprise:12.2.0.2
下载成功:
#docker pull 10.128.222.245:5000/database-enterprise:12.2.0.2 12.2.0.2: Pulling from database-enterprise Digest: sha256:4a6ce8480d5e0aa0dd798564a5340fbfc45033a26468745482457d92008195a1 Status: Downloaded newer image for 10.128.222.245:5000/database-enterprise:12.2.0.2
3. 运行Oracle数据库容器
使用docker run命令运行容器,-p参数是将容器端口映射到外部,--name 指定容器的名称。指定容器名称可以通过该名称引用该容器,而不是通过它随机生成的id。
查看本地镜像
$ docker images