Skip to content

Support for ARM64 #31

@msegado

Description

@msegado

Opening a parallel issue to overhangio/tutor#510. I'm currently able to build on an M1 MacBook by adding a few extra build requirements and environment variables:

diff --git a/tutormfe/templates/mfe/build/mfe/Dockerfile b/tutormfe/templates/mfe/build/mfe/Dockerfile
index 726d9ca..b996eea 100644
--- a/tutormfe/templates/mfe/build/mfe/Dockerfile
+++ b/tutormfe/templates/mfe/build/mfe/Dockerfile
@@ -3,7 +3,18 @@ FROM docker.io/node:12-bullseye-slim AS base
 RUN apt update \
   && apt install -y git \
     # required for cwebp-bin
-    gcc git libgl1 libxi6 make
+    gcc git libgl1 libxi6 make \
+    # additionally required for gifsicle, mozjpeg, and optipng
+    autoconf libtool pkg-config zlib1g-dev \
+    # additionally required for node-sass
+    python g++
+
+# Required for building optipng on M1
+ENV CPPFLAGS=-DPNG_ARM_NEON_OPT=0
+
+# Required for avoiding failed frontend-app-learning build due to missing binary on M1
+# (breaks pact tests)
+ENV PACT_SKIP_BINARY_INSTALL=true
 
 RUN mkdir -p /openedx/app /openedx/env
 WORKDIR /openedx/app

Unfortunately, using PACT_SKIP_BINARY_INSTALL is a hack that will break any Pact tests, so it's not really suitable to merge in. I don't see much alternative until there's an ARM binary for Pact though. Relevant issue: pact-foundation/pact-js-core#347

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions