2023-10-26 23:32:59 +00:00
|
|
|
# Run this file from ruffle root dir (not the docker dir) like this:
|
2024-05-30 17:22:25 +00:00
|
|
|
# rm -rf web/docker/docker_builds/packages/*
|
2023-01-11 21:56:14 +00:00
|
|
|
# docker build --tag ruffle-web-docker -f web/docker/Dockerfile .
|
2023-01-07 23:38:17 +00:00
|
|
|
# docker cp $(docker create ruffle-web-docker:latest):/ruffle/web/packages web/docker/docker_builds/packages
|
2024-02-22 00:26:47 +00:00
|
|
|
FROM node:20
|
2024-03-04 22:08:27 +00:00
|
|
|
|
2024-07-09 01:14:17 +00:00
|
|
|
# Installing wasm-opt from GitHub:
|
|
|
|
# Keep the version number in sync with the ones in the Actions workflows!
|
|
|
|
RUN wget --progress=:giga https://github.com/WebAssembly/binaryen/releases/download/version_118/binaryen-version_118-x86_64-linux.tar.gz
|
|
|
|
RUN tar xzf binaryen-version_118-x86_64-linux.tar.gz binaryen-version_118/bin/wasm-opt
|
|
|
|
RUN mv binaryen-version_118/bin/wasm-opt /usr/local/bin
|
2024-03-04 22:08:27 +00:00
|
|
|
|
2023-10-26 23:32:59 +00:00
|
|
|
# Installing Rust using rustup:
|
2023-08-04 19:30:06 +00:00
|
|
|
RUN wget 'https://sh.rustup.rs' --quiet -O- | sh -s -- -y --profile minimal --target wasm32-unknown-unknown
|
2023-01-07 23:38:17 +00:00
|
|
|
ENV PATH="/root/.cargo/bin:$PATH"
|
2024-03-04 10:28:29 +00:00
|
|
|
RUN cargo install wasm-bindgen-cli --version 0.2.92
|
2024-03-04 22:08:27 +00:00
|
|
|
|
2023-10-26 23:32:59 +00:00
|
|
|
# Building Ruffle:
|
2023-01-07 23:38:17 +00:00
|
|
|
COPY . ruffle
|
|
|
|
WORKDIR ruffle/web
|
2023-10-15 15:25:30 +00:00
|
|
|
ENV CARGO_FEATURES=jpegxr
|
2024-02-22 00:26:47 +00:00
|
|
|
ENV WASM_SOURCE=existing
|
|
|
|
RUN npm ci
|
2023-02-03 02:37:11 +00:00
|
|
|
RUN npm run build:repro
|