oracle / docker-images

Official source of container configurations, images, and examples for Oracle products and projects

Home Page:https://developer.oracle.com/use-cases/#containers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building Oracle EE arm64 on x86 with docker buildx fails

erikhakansson opened this issue · comments

Hi!

I'm trying to build a multi-arch Oracle EE image, however building the arm64 image on x86 hosts fails, despite using buildx, despite other arm64 images working.

In short, I'm doing this to build:

docker buildx create --use --bootstrap

docker buildx build --force-rm=true --no-cache --platform linux/arm64 \
        --build-arg INSTALL_FILE_1=LINUX.ARM64_1919000_db_home.zip --build-arg BASE_IMAGE=oraclelinux:8 \
        --build-arg DB_EDITION=ee \
        --output type=image --pull --push \
        -t "oracle-arm64" \
         -f Dockerfile .

And it goes pretty well for a while. However, towards the end of the build there's this error message:

[FATAL] Error in invoking target 'clean rat_on part_on dm_on olap_on sdo_on rac_off dnfs_off' of makefile '/opt/oracle/product/19c/dbhome_1/rdbms/lib/ins_rdbms.mk'. See '/tmp/InstallActions2024-02-15_03-30-13PM/installActions2024-02-15_03-30-13PM.log' for details.

I've tried modifying the Dockerfile to print that log but there's nothing at all in there regarding this error.

The build succeeds anyway though, and when I try to run the image I get this almost immediatelly:

Error while loading /opt/oracle/product/19c/dbhome_1/bin/lsnrctl: Exec format error

That's clearly an error suggesting we're using the wrong architecture binaries. However, since we are using buildx --platform linux/arm64, there should be an underlying qemu emulation of arm64, and as I stated previously, this only happens for this particular image. Other (non-Oracle) arm64 images build fine without issue.

I get the same issue on multiple x86 hosts. I also tried doing the opposite, building x86 on an arm64 host, and that worked fine, but that's not a realistic option as I don't have regular access to that.

Any idea on how to solve this?