1
- FROM ojkwon/arch-nvm-node:4032238-node7.9-npm4
1
+ FROM ojkwon/arch-nvm-node:7b0d30e-node8.4-npm5.4.1
2
2
MAINTAINER OJ Kwon <
[email protected] >
3
3
4
4
# Build time args
5
5
ARG BUILD_TARGET=""
6
6
7
+ # Upgrade system
8
+ RUN pacman --noconfirm -Syyu
9
+
7
10
# Install dependencies
8
- RUN pacman --noconfirm -Syu \
11
+ RUN pacman --noconfirm -S \
9
12
emscripten \
10
13
unzip \
11
14
python \
@@ -16,6 +19,12 @@ RUN pacman --noconfirm -Syu \
16
19
# Change subsequent execution shell to bash
17
20
SHELL ["/bin/bash" , "-l" , "-c" ]
18
21
22
+ # Patch preamble.js to support Electron's renderer process with node.js environment
23
+ # Refer https://github.com/kripken/emscripten/pull/5577 for detail.
24
+ # TODO: remove based on upstream PR status
25
+ COPY ./preamble.patch $TMPDIR/
26
+ RUN patch /usr/lib/emscripten/src/preamble.js $TMPDIR/preamble.patch
27
+
19
28
# Initialize emcc
20
29
RUN emcc
21
30
@@ -28,7 +37,7 @@ RUN if [[ "${BUILD_TARGET}" == "protobuf" ]]; then \
28
37
echo "installing protobuf 3.1 dependency" && \
29
38
mkdir $TMPDIR/proto31 && cd $TMPDIR/proto31 && \
30
39
curl "https://git.archlinux.org/svntogit/packages.git/plain/trunk/PKGBUILD?h=packages/protobuf&id=fa8b9da391b26b6ace1941e9871a6416db74d67b" > ./PKGBUILD && \
31
- makepkg && sudo pacman --noconfirm -U *.pkg.tar.xz && \
40
+ makepkg --skipchecksums && sudo pacman --noconfirm -U *.pkg.tar.xz && \
32
41
cd $TMPDIR && git clone https://github.com/kwonoj/protobuf-emscripten && \
33
42
cd $TMPDIR/protobuf-emscripten/3.1.0 && \
34
43
sh autogen.sh && emconfigure ./configure && emmake make && \
0 commit comments