oracle docker image

https://github.com/oracle/docker-images/tree/main/OracleDatabase/SingleInstance

使用docker启动失败:

docker run --name oracle19300 \
-p 1521:1521 -p 5500:5500 -p 2484:2484 \
-e ORACLE_SID=SUCCESS \
-e ORACLE_PDB=SUCCESSPDB \
-e ORACLE_PWD=123456 \
-e INIT_PGA_SIZE=1544 \
-e ORACLE_CHARACTERSET=utf-8 \
-e ENABLE_ARCHIVELOG=true \
-e ENABLE_TCPS=true \
-v /opt/oracle/oradata \
oracle/database:19.3.0-ee
ERRO[0000] Removing timer for container 9xxxxxxxxxxxxxxxxxxx42 healthcheck: unable to get systemd connection to remove healthchecks: dial unix /run/systemd/private: connect: no such file or directory
Error: netavark: unable to append rule '-d 10.88.0.0/16 -j ACCEPT' to table 'nat': code: 4, msg: iptables v1.8.7 (nf_tables):  RULE_APPEND failed (No such file or directory): rule in chain NETAVARK-1D8721804F16F

ERRO[0000] Removing timer for container这个错误信息可以忽略, 具体的错误原因实际是下面一条Error: netavark: unable to append rule,
因为podman依赖的应该是老版本的iptables, 新版本iptables不兼容, 切换到老版本的方法:

yum install iptables-legacy
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy

update-alternatives这个命令竟然可以在oracle9 centos中使用

ubuntu中切换方法:

root@DESKTOP-6RJPLEM:~# update-alternatives --config iptables
There are 2 choices for the alternative iptables (providing /usr/sbin/iptables).

  Selection    Path                       Priority   Status
------------------------------------------------------------
* 0            /usr/sbin/iptables-nft      20        auto mode
  1            /usr/sbin/iptables-legacy   10        manual mode
  2            /usr/sbin/iptables-nft      20        manual mode

Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in manual mode
root@DESKTOP-6RJPLEM:~#
posted @ 2022-12-09 16:45  funny_coding  阅读(151)  评论(0编辑  收藏  举报
build beautiful things, share happiness