wiki/Dockerfile

20 lines
389 B
Text
Raw Permalink Normal View History

2024-01-05 18:38:26 +05:30
FROM nixos/nix:latest AS builder
WORKDIR /build
2024-01-04 18:27:38 +05:30
COPY . .
RUN nix \
--extra-experimental-features "nix-command flakes" \
build .#app
2024-01-05 18:38:26 +05:30
RUN mkdir -p /tmp/nix-store-closure
RUN cp -ra $(nix-store -qR result/) /tmp/nix-store-closure
FROM alpine:latest
WORKDIR /app
COPY --from=builder /tmp/nix-store-closure /nix/store
COPY --from=builder /build/result /app
CMD [ "/app/bin/app" ]
2024-01-04 18:27:38 +05:30