Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AydinChavez opened this issue Jan 6, 2023 · 1 comment
Open

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

AydinChavez opened this issue Jan 6, 2023 · 1 comment

Comments

@AydinChavez
Copy link

AydinChavez commented Jan 6, 2023

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
@AydinChavez AydinChavez changed the title Support on ARM (M1/M2 Macs) Compatibility on Apple Chips (M1, M2, ..) Jan 6, 2023
@AydinChavez AydinChavez changed the title Compatibility on Apple Chips (M1, M2, ..) Compatibility on Apple ARM CPUs (M1, M2, ..) Jan 9, 2023
@arempter
Copy link
Owner

thanks for reporting this. I do not have M1 mac to test it. I suggest creating a separate Dockerfile for M1 architectures. We can even add makefile to help build docker files.
Are you ok to submit PR for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants