https://dev.kronoz.win/r/rgit.git
1FROM nixos/nix:latest AS builder
2
3WORKDIR /app
4COPY . .
5
6RUN nix --extra-experimental-features "nix-command flakes" --accept-flake-config build .#
7RUN mkdir /tmp/nix-store-closure
8RUN cp -R $(nix-store -qR result/) /tmp/nix-store-closure
9
10FROM scratch
11
12WORKDIR /app
13COPY --from=builder /tmp/nix-store-closure /nix/store
14COPY --from=builder /app/result /app
15
16ENTRYPOINT ["/app/bin/rgit"]