version: '3'
services:
oracle11g:
image: oracleinanutshell/oracle-xe-11g
container_name: oracle11g
privileged: true
environment:
- TZ=Asia/Shanghai
- ORACLE_ALLOW_REMOTE=true
- ORACLE_DISABLE_ASYNCH_IO=true
- ORACLE_ENABLE_XDB=true
#volumes:
#- ./data/app/oracle/:/u01/app/oracle/
ports:
- 11521:1521
restart: always
#启动oracle容器服务
docker-compose up -d
# 查看启动的容器
docker-compose ps
- 主机:服务器IP
- 端口:11521
- sid:xe
- 用户名:system
- 密码:oracle
-- 创建用户myuser,密码password
create user myuser identified by password;
-- 分配表空间权限
grant create table,unlimited tablespace to myuser;
-- 分配查询权限
grant select any table to myuser;
-- 分配增删改权限
grant update any table,drop any table,insert any table to myuser;
-- 分配创建session权限(登陆)
grant create session to myuser;