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 <mattcen@mattcen.com>
This commit is contained in:
Matthew Cengia 2021-03-23 13:06:07 +11:00
parent 6964bca40e
commit ca07186d16

View File

@ -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