aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-07-07 08:50:53 +0530
committerLibravatar GitHub <noreply@github.com>2021-07-07 08:50:53 +0530
commit4669e0327d91ab4e203bd7fbfdc59c13601374ad (patch)
tree6d1ed095568f28898c1db4e9eb9514343b9e15d5 /Dockerfile
parentfix: fix breaking tab component (diff)
downloadferdium-app-4669e0327d91ab4e203bd7fbfdc59c13601374ad.tar.gz
ferdium-app-4669e0327d91ab4e203bd7fbfdc59c13601374ad.tar.zst
ferdium-app-4669e0327d91ab4e203bd7fbfdc59c13601374ad.zip
Building ferdi on an ARM machine (#1611)
Moving away from electron-builder base image (since it doesn't support building on ARM yet)
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile37
1 files changed, 30 insertions, 7 deletions
diff --git a/Dockerfile b/Dockerfile
index c94b42539..b6526460f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,24 +1,47 @@
1FROM electronuserland/builder:14 as builder 1# Note: Before running this file, you should have already cloned the git repo + submodules on the host machine. This is used when actively developing on your local machine, but you want to build for a different architecture
2
3FROM node:fermium-buster as builder
4
5# TODO: Need to setup a non-root user for security purposes
6
7ENV PATH="/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/lib:/usr/include:/usr/share"
8
9ARG DEBIAN_FRONTEND=noninteractive
10# Note: This is added for building on ARM machines
11ARG USE_SYSTEM_FPM="true"
12# Note: Added to bypass the error with missing git repo information for the 'preval-build-info' module
13ARG PREVAL_BUILD_INFO_PLACEHOLDERS=true
14
15RUN apt-get update \
16 && apt-get install -y rpm ruby gem \
17 && gem install fpm --no-ri --no-rdoc --no-document
2 18
3WORKDIR /usr/src/ferdi 19WORKDIR /usr/src/ferdi
4 20
5COPY package*.json ./ 21COPY package*.json ./
6COPY lerna.json ./ 22COPY lerna.json ./
7 23
8# Note: This is being set to bypass the error with missing git repo information for the 'preval-build-info' module
9ENV PREVAL_BUILD_INFO_PLACEHOLDERS=true
10
11RUN npm i -g node-gyp@8.0.0 \ 24RUN npm i -g node-gyp@8.0.0 \
12 && npm config set node_gyp "$(which node-gyp)" \ 25 && npm config set node_gyp "$(which node-gyp)"
13 && npx lerna bootstrap
14 26
15COPY . . 27COPY . .
16 28
17RUN cd recipes && npm i && npm run package && cd .. 29# Note: Ideally this needs to be done before the COPY step - BUT moving this here resolves the issue with `preval-build-info-cli` not being found
30RUN npx lerna bootstrap
31
32RUN cd recipes \
33 && npm i \
34 && npm run package \
35 && cd ..
36
18RUN npm run build 37RUN npm run build
19 38
39# --------------------------------------------------------------------------------------------
40
20FROM busybox 41FROM busybox
21 42
43# TODO: Need to setup a non-root user for security purposes
44
22WORKDIR /ferdi 45WORKDIR /ferdi
23 46
24COPY --from=builder /usr/src/ferdi/out/* /ferdi/ 47COPY --from=builder /usr/src/ferdi/out/* /ferdi/