FROM cr.weirdboi.dev/base/rust:latest ARG PLATFORM="linux.x86_64" ARG GODOT_VERSION="4.3-stable" ARG BUTLER_VERSION="15.12.0" USER root WORKDIR /root RUN apt-get update \ && apt-get install -y git libfontconfig1 \ && rm -rf /var/lib/apt/lists/* COPY commands/godot_build.sh /usr/bin/godot_build COPY commands/godot_build_web.sh /usr/bin/godot_build_web COPY commands/godot_install.sh /usr/bin/godot_install COPY commands/godot_project_title.sh /usr/bin/godot_project_title COPY commands/butler_install.sh /usr/bin/butler_install COPY commands/butler_upload.sh /usr/bin/butler_upload COPY commands/emsdk_install.sh /usr/bin/emsdk_install RUN chmod +x /usr/bin/godot_* /usr/bin/butler_* RUN emsdk_install /usr/bin USER rustbuilder WORKDIR /home/rustbuilder RUN godot_install $GODOT_VERSION $PLATFORM RUN butler_install $BUTLER_VERSION ENV EMSDK=/usr/bin/emsdk ENV EMSDK_NODE="${EMSDK}/node/20.18.0_64bit/bin/node" ENV PATH="${EMSDK}:${EMSDK}/upstream/emscripten:${PATH}" RUN rustup component add rust-src --toolchain nightly && \ rustup target add wasm32-unknown-emscripten --toolchain nightly