-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.build
28 lines (22 loc) · 1.13 KB
/
Dockerfile.build
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
FROM emscripten/emsdk AS bin-packages
RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
libgmp10 openssl mingw-w64 libsdl2-dev file && \
rm -rf /var/lib/apt/lists/*
FROM bin-packages AS dev-packages
RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
libgmp-dev libssl-dev ninja-build && \
rm -rf /var/lib/apt/lists/*
FROM dev-packages AS build-spasm
RUN git clone --depth=1 https://github.com/alberthdev/spasm-ng.git
RUN make -C spasm-ng -j$(nproc) && make -C spasm-ng DESTDIR=/usr install
FROM bin-packages
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path && \
ln -s -t /usr/local/bin /usr/local/cargo/bin/* && \
rustup target add wasm32-unknown-emscripten i686-pc-windows-gnu
RUN curl -L https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage \
-o /usr/local/bin/linuxdeploy && \
chmod +x /usr/local/bin/linuxdeploy
COPY --from=build-spasm /usr/bin/spasm /usr/bin