2023-01-07 23:38:17 +00:00
|
|
|
# run this file from ruffle root dir (not the docker dir) like
|
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
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update -y
|
|
|
|
RUN apt-get -y full-upgrade
|
2023-01-20 03:03:46 +00:00
|
|
|
RUN apt-get install -y apt-utils
|
|
|
|
RUN apt-get install -y wget git openssl libssl-dev gcc gzip tar default-jdk default-jre pkg-config
|
2023-01-07 23:38:17 +00:00
|
|
|
RUN wget 'https://deb.nodesource.com/setup_lts.x' --quiet -O- | bash
|
2023-01-20 03:03:46 +00:00
|
|
|
RUN apt-get install -y nodejs
|
2023-01-21 00:06:19 +00:00
|
|
|
RUN wget 'https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh';
|
|
|
|
RUN bash ./Miniconda3-latest-Linux-x86_64.sh -b -p /miniconda;
|
|
|
|
ENV PATH="/miniconda/bin:$PATH"
|
|
|
|
RUN conda install -y -c conda-forge binaryen
|
2023-01-07 23:38:17 +00:00
|
|
|
RUN wget 'https://sh.rustup.rs' --quiet -O- | sh -s -- -y
|
|
|
|
# RUN source "$HOME/.cargo/env"
|
|
|
|
# source to modify env doesn't work with docker it seems :( so add cargo to PATH manually:
|
|
|
|
ENV PATH="/root/.cargo/bin:$PATH"
|
|
|
|
RUN rustup update
|
|
|
|
RUN rustup target add wasm32-unknown-unknown
|
2023-05-17 01:06:54 +00:00
|
|
|
RUN cargo install wasm-bindgen-cli --version 0.2.86
|
2023-01-07 23:38:17 +00:00
|
|
|
COPY . ruffle
|
|
|
|
WORKDIR ruffle/web
|
|
|
|
RUN npm install
|
2023-02-03 02:37:11 +00:00
|
|
|
RUN npm run build:repro
|