FROM nixos/nix:latest AS builderWORKDIR /appCOPY . .RUN nix --extra-experimental-features "nix-command flakes" --accept-flake-config build .#RUN mkdir /tmp/nix-store-closureRUN cp -R $(nix-store -qR result/) /tmp/nix-store-closureFROM scratchWORKDIR /appCOPY --from=builder /tmp/nix-store-closure /nix/storeCOPY --from=builder /app/result /appENTRYPOINT ["/app/bin/rgit"]