change final image to use debian base
This commit is contained in:
parent
fa59e20dcf
commit
55d34f3650
1 changed files with 12 additions and 3 deletions
15
Dockerfile
15
Dockerfile
|
@ -1,10 +1,19 @@
|
||||||
FROM nixos/nix:latest
|
FROM nixos/nix:latest AS builder
|
||||||
WORKDIR /app
|
WORKDIR /build
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN nix \
|
RUN nix \
|
||||||
--extra-experimental-features "nix-command flakes" \
|
--extra-experimental-features "nix-command flakes" \
|
||||||
build .#app
|
build .#app
|
||||||
|
|
||||||
CMD [ "/app/result/bin/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" ]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue