SIDN / entrada2

GNU General Public License v3.0
5 stars 2 forks source link

Docker image Iceberg Rest Catalog in arm64 #1

Closed caravori closed 6 months ago

caravori commented 8 months ago

Description

[docker-compose.yml]

iceberg-rest-catalog:
    image: sidnlabs/iceberg-restcatalog-server:0.0.1
    profiles: ["dev","test"]
    restart: always

Using docker inspect the Architecture from image is arm64, causing errors if you are using x86_64 processors. [docker inspect sidnlabs/iceberg-restcatalog-server:0.0.1]

"Architecture": "arm64",
"Variant": "v8",
"Os": "linux",

This causes the iceberg-restcatalog-server to not run java correctly. Resulting into this error: [docker output]

exec /usr/lib/jvm/java-21-openjdk/bin/java: exec format error

Hotfix

Build your own iceberg-restcatalog-server image using docker build.


git clone https://github.com/SIDN/iceberg-rest-catalog-server && cd iceberg-rest-catalog-server/ && export TOOL_VERSION=0.1.1 &&
mvn package && docker build --tag=iceberg-rest-catalog-server:$TOOL_VERSION .
mwullink commented 6 months ago

Added the target platform in the Dockerfile, defaulting to x86

FROM --platform=linux/amd64 eclipse-temurin:21-alpine as temurin-jdk