adtya.xyz/Dockerfile

19 lines
394 B
Docker

FROM nixos/nix:latest AS builder
WORKDIR /build
COPY . .
RUN nix \
--extra-experimental-features "nix-command flakes" \
build .#app
RUN mkdir -p /tmp/nix-store-closure
RUN cp -ra $(nix-store -qR result/) /tmp/nix-store-closure
FROM debian:stable-slim
WORKDIR /app
COPY --from=builder /tmp/nix-store-closure /nix/store
COPY --from=builder /build/result /app
CMD [ "/app/bin/app" ]