Skip to content
Snippets Groups Projects
Dockerfile 1.09 KiB
Newer Older
Louis's avatar
Louis committed
FROM cr.weirdboi.dev/base/rust:latest

ARG PLATFORM="linux.x86_64"
ARG GODOT_VERSION="4.3-stable"
ARG BUTLER_VERSION="15.12.0"

Louis's avatar
Louis committed
USER root
WORKDIR /root
Louis's avatar
Louis committed

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_*
Louis's avatar
Louis committed
RUN emsdk_install /usr/bin

USER rustbuilder
WORKDIR /home/rustbuilder

Louis's avatar
Louis committed
RUN godot_install $GODOT_VERSION $PLATFORM
RUN butler_install $BUTLER_VERSION
Louis's avatar
Louis committed
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