CodeWithAloha / HIERR

A Human-Centered Digital Engagement Process for the Hawai‘i Economic Recovery & Resilience Project with the State Office of Planning & Sustainable Development
https://hierr.vercel.app/
8 stars 7 forks source link

ARM64 Compatibility (for M1/M2 Mac, etc.) with SQL #158

Open Hooobot opened 9 months ago

Hooobot commented 9 months ago

After running docker compose up -d... The following errors appears:

! sql The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 0.0s

Attempted troubleshooting included running: docker build --platform linux/arm64 . but that requires a created Dockerfile

Running SQLite instead of SQLServer is an alternative solution. This requires changing the .env file to include proper SQLite configuration in changing:

.. to match the proper SQLite dependencies.

Then, run:

  1. npx prisma db push
  2. npm run dev
MichaelTamaki commented 9 months ago

@Hooobot Could you try updating your docker compose file? https://stackoverflow.com/a/68434363

platform: "linux/arm64"

https://github.com/CodeWithAloha/HIERR/blob/main/compose.yaml#L2

Somewhere in compose.yaml within the sql confirguation?

Hooobot commented 9 months ago

Unfortunately updating the docker compose to include ARM64 platform didn't seem to resolve it. However, changing the sql image from mcr.microsoft.com/mssql/server:2017-latest to mcr.microsoft.com/azure-sql-edge did allow me to launch the sql docker container. Unfortunately that still didn't seem to resolve the issue since as of September 2023, Microsoft azure-sql-edge seemed to no longer support ARM64 platforms.