2023-10-26 23:32:59 +00:00
|
|
|
# Run this file from ruffle root dir (not the docker dir) like this:
|
2023-01-11 21:52:06 +00:00
|
|
|
# rm -rf web/docker/docker_builds/*
|
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
|
|
|
|
FROM ubuntu:22.04
|
2023-10-26 23:32:59 +00:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update -y
|
2023-01-07 23:38:17 +00:00
|
|
|
RUN apt-get -y full-upgrade
|
2023-10-26 23:32:59 +00:00
|
|
|
# Installing dependencies:
|
2023-01-20 03:03:46 +00:00
|
|
|
RUN apt-get install -y apt-utils
|
2023-10-26 23:32:59 +00:00
|
|
|
RUN apt-get install -y wget git openssl libssl-dev gcc clang gzip tar default-jre-headless pkg-config
|
|
|
|
# Installing Node.js from the nodesource repo according to their instructions:
|
|
|
|
RUN apt-get install -y ca-certificates curl gnupg
|
|
|
|
RUN mkdir -p /etc/apt/keyrings
|
|
|
|
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
|
|
|
ENV NODE_MAJOR=20
|
|
|
|
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
|
|
|
|
RUN apt-get update -y
|
2023-01-20 03:03:46 +00:00
|
|
|
RUN apt-get install -y nodejs
|
2023-10-26 23:32:59 +00:00
|
|
|
# Getting Miniconda from their website:
|
|
|
|
RUN wget 'https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh'
|
|
|
|
RUN bash ./Miniconda3-latest-Linux-x86_64.sh -b -p /miniconda
|
2023-01-21 00:06:19 +00:00
|
|
|
ENV PATH="/miniconda/bin:$PATH"
|
|
|
|
RUN conda install -y -c conda-forge binaryen
|
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"
|
2023-11-28 22:14:03 +00:00
|
|
|
RUN cargo install wasm-bindgen-cli --version 0.2.89
|
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
|
2023-12-01 19:37:35 +00:00
|
|
|
RUN npm install
|
2023-02-03 02:37:11 +00:00
|
|
|
RUN npm run build:repro
|