From ca07186d16a20e857bed406037168dc560a9c5fe Mon Sep 17 00:00:00 2001 From: Matthew Cengia Date: Tue, 23 Mar 2021 13:06:07 +1100 Subject: [PATCH] Build Dockerfile on arm64 This isn't ideal yet; the second state shouldn't need to rebuild a bunch of node packages, but I'm not sufficiently experienced with node to know which files to copy in from the `build` stage. Signed-off-by: Matthew Cengia --- Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Dockerfile b/Dockerfile index 55a9625..952b8a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,12 +7,18 @@ WORKDIR /home/node/matrix-dimension RUN mkdir -p /home/node/matrix-dimension +RUN apk update && \ + apk add python2 glib-dev make g++ vips-dev libc-dev && \ + rm -rf /var/lib/apk/* /var/cache/apk/* + COPY . /home/node/matrix-dimension RUN chown -R node /home/node/matrix-dimension USER node +ENV CPATH=/usr/include/glib-2.0:/usr/lib/glib-2.0/include/ + RUN npm clean-install && \ node /home/node/matrix-dimension/scripts/convert-newlines.js /home/node/matrix-dimension/docker-entrypoint.sh && \ NODE_ENV=production npm run-script build @@ -31,6 +37,12 @@ RUN chown -R node /home/node/matrix-dimension RUN mkdir /data && chown -R node /data +RUN apk update && \ + apk add python2 glib-dev make g++ vips-dev libc-dev && \ + rm -rf /var/lib/apk/* /var/cache/apk/* + +ENV CPATH=/usr/include/glib-2.0:/usr/lib/glib-2.0/include/ + USER node RUN npm clean-install --production