Skip to content

Compatibility on Apple ARM CPUs (M1, M2, ..) #8

Description

@AydinChavez

Hi,

thanks for this great work!

It did not run on my M2 Mac due to the usage of a non-ARM compatible Java8 base image, therefore I wanted to share my solution for others:

Dockerfile:

#FROM openjdk:8u242-jre <- comment this out and add next line
FROM arm64v8/openjdk:8
..

The bucket spark was not existing in minio initially and also its web UI was not reachable (because of its listening port being randomly chosen), therefore I added following tweaks taken from:

docker-compose.yml:

version: "2"

services:
  mariadb:
    image: mariadb:latest
    ports:
      - 3306:3306
    environment:
      MYSQL_ROOT_PASSWORD: admin
      MYSQL_USER: admin
      MYSQL_PASSWORD: admin
      MYSQL_DATABASE: metastore_db

  # make sure that you specify correct volume to be mounted
  minio:
    image: minio/minio
    environment:
      - MINIO_ACCESS_KEY=accesskey
      - MINIO_SECRET_KEY=secretkey
    volumes:
      - ./data1/minio:/data
    ports:
      - 9000:9000
      - 9001:9001
    command: server --address ":9000" --console-address ":9001" /data

  createbuckets:
    image: minio/mc
    depends_on:
      - minio
    entrypoint: >
      /bin/sh -c "
      /usr/bin/mc alias set myminio http://minio:9000 accesskey secretkey;
      /usr/bin/mc mb myminio/spark;
      /usr/bin/mc policy set public myminio/spark;
      exit 0;
      "

  hive-metastore:
    build: .
    image: hive-metastore:latest
    ports:
    - 9083:9083
    depends_on:
      - mariadb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions