-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Dockerfile
50 lines (44 loc) · 1.17 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# https://github.com/emscripten-core/emsdk
FROM docker.io/emscripten/emsdk:3.1.73
# Path settings
ENV \
RUSTUP_HOME="/usr/local/rustup" \
CARGO_HOME="/usr/local/cargo" \
PATH="/usr/local/cargo/bin:$PATH"
RUN \
apt-get update && \
apt-get install -qqy \
build-essential \
ccache \
libglib2.0-dev \
pkgconf \
# needed for Meson
ninja-build \
python3-pip \
# needed by GLib
python3-packaging \
&& \
pip3 install meson
# Emscripten patches
RUN \
curl -Ls https://github.com/emscripten-core/emscripten/compare/3.1.73...kleisauke:wasm-vips-3.1.73.patch | patch -p1 -d $EMSDK/upstream/emscripten && \
emcc --clear-cache && embuilder build sysroot --force
# Rust
RUN \
curl https://sh.rustup.rs -sSf | sh -s -- -y \
--no-modify-path \
--profile minimal \
--target wasm32-unknown-emscripten \
--default-toolchain nightly-2024-11-29 \
--component rust-src
# Cache settings
ENV \
# Enable Emscripten sysroot cache
EM_CACHE="/src/build/emcache" \
# Enable Rust cache
CARGO_HOME="/src/build/cargo-cache" \
# Enable ccache
CCACHE_DIR="/src/build/ccache" \
_EMCC_CCACHE=1
ENTRYPOINT ["/bin/bash"]
CMD ["./build.sh"]