1、安装 qmeu

wget https://download.qemu.org/qemu-8.0.0-rc3.tar.xz
tar xvJf qemu-8.0.0-rc3.tar.xz
cd qemu-8.0.0-rc3
./configure
make
make install

2、可能需要安装的依赖,编译安装需要

yum install ninja-build
yum install clang
yum install iasl
yum install gcc-c++
yum install pixman pixman-devel
dnf install gmp-devel
dnf install libmpc-devel
dnf install mpfr
dnf install mpfr-devel
dnf install texinfo

3、gcc版本过低

wget http://ftp.gnu.org/gnu/gcc/gcc-7.5.0/gcc-7.5.0.tar.gz
tar zxvf gcc-7.5.0.tar.gz
cd gcc-7.5.0
mkdir build
../configure --prefix=/usr/bin --enable-checking=release --enable-languages=c,c++ --disable-multilib 
#
make -j8	//启用多线程编译
make install  //防止权限问题

4、注册qemu解释器

# x86运行arm
docker run --rm --privileged multiarch/qemu-user-static:register --reset
# arm运行x86
docker run --rm --privileged aptman/qus -s -- -p x86_64

5、创建oracle容器

docker run -d -p 1521:1521 -e ORACLE_PASSWORD=cj123456 -v /usr/local/bin/qemu-x86_64:/usr/bin/qemu-x86_64 -v /opt/congjing/oracle/oradata:/u01/app/oracle/oradata gvenzl/oracle-xe:11
docker run -d -p 1521:1521 -e ORACLE_PASSWORD=cj123456 -v /usr/local/bin/qemu-x86_64:/usr/bin/qemu-x86_64 gvenzl/oracle-xe
-v /opt/congjing/oracle/oradata:/opt/oracle/oradata