forked from sesh/anubis-rebranding
The nightly reskin has failed since upstream Anubis required Go 1.27.3 (go.mod) and started building its proof-of-work wasm modules with Rust: npm ci's prepare step runs `go mod download && cargo fetch`. - golang:1.27-bookworm, plus GOTOOLCHAIN=auto so the next go.mod bump fetches a newer toolchain instead of failing - Rust (rustup, minimal profile) with the wasm32-unknown-unknown target Test-built against v1.28.2 with the mascot overlay: the image runs and serves the reskinned happy.webp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
1.1 KiB
Docker
26 lines
1.1 KiB
Docker
# syntax=docker/dockerfile:1
|
|
|
|
# ---- build: compile anubis with your overlaid mascot baked in ----
|
|
# Go version must satisfy upstream's go.mod; GOTOOLCHAIN=auto fetches a newer one when upstream bumps it
|
|
FROM golang:1.27-bookworm AS build
|
|
ENV GOTOOLCHAIN=auto
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
|
&& apt-get install -y --no-install-recommends nodejs zstd brotli \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
# Rust + wasm target: upstream builds its proof-of-work wasm modules (npm prepare runs cargo fetch)
|
|
ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH=/usr/local/cargo/bin:$PATH
|
|
RUN curl -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal --target wasm32-unknown-unknown
|
|
ENV HUSKY=0
|
|
WORKDIR /src
|
|
# context = upstream checkout, with mascot/*.webp already copied in
|
|
COPY . .
|
|
RUN npm ci
|
|
# go generate + web/xess assets + go build -> ./var/anubis
|
|
RUN mkdir -p var && npm run build
|
|
|
|
# ---- runtime: minimal, same uid/gid as upstream's image ----
|
|
FROM gcr.io/distroless/base-debian12
|
|
COPY --from=build /src/var/anubis /usr/local/bin/anubis
|
|
USER 1000:1000
|
|
EXPOSE 8923 9090
|
|
ENTRYPOINT ["/usr/local/bin/anubis"] |