# ipx-directory (#204). Built from the repo's root: docker buildx build -f Dockerfile.directory . # No node here: only ipx's own build runs web/build.mjs. FROM rust:1-slim-trixie AS build # SQLite is compiled from source for sqlx, which needs a C toolchain. RUN apt-get update && apt-get install -y --no-install-recommends build-essential \ && rm -rf /var/lib/apt/lists/* WORKDIR /src # Every member of the workspace, since cargo reads them all to build one. # ponytail: no dependency layer, so each build compiles sea-orm again; add the stub trick from # the main Dockerfile if builds get slow enough to matter. COPY Cargo.toml Cargo.lock ./ COPY crates ./crates # The logo and icon the public pages serve (#215), compiled into the binary. COPY web/logo.svg web/logo-dark.svg web/favicon.png ./web/ RUN cargo build --release --locked -p ipx-directory FROM debian:trixie-slim RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \ && rm -rf /var/lib/apt/lists/* COPY --from=build /src/target/release/ipx-directory /usr/local/bin/ipx-directory ENV DIRECTORY_CONFIG=/config/directory.toml # Unraid's nobody:users. It writes nothing to disk: the database is elsewhere. USER 99:100 EXPOSE 8100 CMD ["ipx-directory"]