1、拉取 Docker 镜像:
user@user-PC:~$ docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
Using default tag: latest
latest: Pulling from helowin/oracle_11g
ed5542b8e0e1: Pull complete
a3ed95caeb02: Pull complete
1e8f80d0799e: Pull complete
Digest: sha256:4c12b98372dfcbaafcd9564a37c8d91456090a5c6fb07a4ec18270c9d9ef9726
Status: Downloaded newer image for registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g:latest
该镜像比较大,有6G多,可能需要下载一会。
2、运行 Docker 镜像
2.1、查看镜像
user@user-PC:~$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g latest 3fa112fd3642 3 years ago 6.85GB
2.2、镜像改名
user@user-PC:~$ docker tag registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g oracle11g \
& docker rmi registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
2.3、运行镜像
user@user-PC:~$ docker run -d -p 1521:1521 --name oracle11g oracle11g
3、进入容器修改账号密码
3.1、检查容器运行状态
user@user-PC:~$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a151f9478f94 oracle11g "/bin/sh -c '/home/o…" About a minute ago Up 30 seconds 0.0.0.0:1521->1521/tcp oracle
网友评论