Files
another-boids-in-rust/Dockerfile
Robert Garrett 3e3bbd973f Update Dockerfile to use the new Make-based build
I'm going to run into consistency problems at some point, so I'm going
to get ahead of that by updating the container build process.
2025-11-08 10:58:48 -06:00

20 lines
515 B
Docker

FROM rust:1.89 AS builder
RUN apt-get update
RUN apt-get install -y --no-install-recommends libasound2-dev libudev-dev
RUN rustup target add wasm32-unknown-unknown
RUN cargo install --locked wasm-bindgen-cli
COPY . .
RUN make -j
FROM busybox:musl
RUN mkdir -p /var/www
COPY --from=builder ./out/ /var/www
WORKDIR /var/www
# TODO: Make httpd accept interrupt signals so the container exits properly.
# (<ctrl>+c and `docker stop ...` don't work because Busybox doesn't answer)
CMD ["httpd", "-f", "-p", "8080"]