下载
https://www.oracle.com/database/technologies/oracle-database-software-downloads.html#db_free


docker pull container-registry.oracle.com/database/free:latest
docker run -d -it --name oracle -p 1521:1521 -p 5500:5500 -e ORACLE_PWD=123456 container-registry.oracle.com/database/free:latest

p 1521:1521 -p 5500:5500: 映射主机的1521端口到容器的1521端口,以及主机的5500端口到容器的5500端口。

-e ORACLE_PWD=123456: 设置 Oracle 数据库管理员用户(SYS、SYSTEM等)的密码为"123456"。

spring.datasource.oracle.driver=oracle.jdbc.OracleDriver
spring.datasource.oracle.url=jdbc:oracle:thin:@localhost:1521/FREE
spring.datasource.oracle.username=SYSTEM
spring.datasource.oracle.password=123456

上面的31521是有本地映射