Compare commits

...

4 Commits

Author SHA1 Message Date
J. Ryan Stinnett 7e3527ff9c
Merge pull request #14522 from mattcen/fix-arm-docker-build
Fix arm docker build
2020-07-31 13:29:11 +01:00
Matt Cengia 86185e8186 Document packages for installing Canvas via Docker
Signed-off-by: Matt Cengia <mattcen@mattcen.com>
2020-07-31 22:27:16 +10:00
Matt Cengia fb79373a6d Bump node build version
When trying to build the Docker image, I kept receiving an out-of-memory
error from Webpack. This issue is apparently explained at
https://github.com/webpack/webpack/issues/1914.
Several comments in the issue suggested using Node 12 or above. Doing so
resolved this issue for me.

Signed-off-by: Matt Cengia <mattcen@mattcen.com>
2020-07-16 16:21:00 +10:00
Matt Cengia 846cebe9ff Add build dependencies for 'canvas' to Dockerfile
When building the Docker image on amd64, canvas can be installed
from a pre-built binary. When building on an another architecture,
however, such as arm (e.g. on a Raspberry Pi), these binaries need to be
built locally, as per https://www.npmjs.com/package/canvas#compiling.
These added dependencies facilitate this. See also, issue #14400.

Signed-off-by: Matt Cengia <mattcen@mattcen.com>
2020-07-16 16:21:00 +10:00
1 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,5 @@
# Builder # Builder
FROM node:10 as builder FROM node:12 as builder
# Support custom branches of the react-sdk and js-sdk. This also helps us build # Support custom branches of the react-sdk and js-sdk. This also helps us build
# images of riot-web develop. # images of riot-web develop.
@ -9,7 +9,10 @@ ARG REACT_SDK_BRANCH="master"
ARG JS_SDK_REPO="https://github.com/matrix-org/matrix-js-sdk.git" ARG JS_SDK_REPO="https://github.com/matrix-org/matrix-js-sdk.git"
ARG JS_SDK_BRANCH="master" ARG JS_SDK_BRANCH="master"
RUN apt-get update && apt-get install -y git dos2unix RUN apt-get update && apt-get install -y git dos2unix \
# These packages are required for building Canvas on architectures like Arm
# See https://www.npmjs.com/package/canvas#compiling
build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
WORKDIR /src WORKDIR /src