mirror of
https://github.com/zerotier/zeronsd.git
synced 2026-05-22 16:25:37 -07:00
22 lines
486 B
Docker
22 lines
486 B
Docker
FROM --platform=$BUILDPLATFORM nixos/nix:latest AS builder
|
|
|
|
COPY . /tmp/build
|
|
WORKDIR /tmp/build
|
|
|
|
RUN nix \
|
|
--extra-experimental-features "nix-command flakes" \
|
|
--option filter-syscalls false \
|
|
build
|
|
|
|
RUN mkdir /tmp/nix-store-closure
|
|
RUN cp -R $(nix-store -qR result/) /tmp/nix-store-closure
|
|
|
|
FROM scratch
|
|
|
|
WORKDIR /
|
|
|
|
# Copy /nix/store
|
|
COPY --from=builder /tmp/nix-store-closure /nix/store
|
|
COPY --from=builder /tmp/build/result/bin/zeronsd /bin/zeronsd
|
|
CMD ["/bin/zeronsd"]
|