!VhbWwlUdjHkamKnfrK:nixos.org

Nix: Cloud Native

254 Members
57 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
29 May 2021
@edude03:matrix.orgedude03 joined the room.01:26:40
@ldesgoui:matrix.orgldesgoui

Good morning, it is time to do cursed things

# ATTN: This Dockerfile is only here to provide compatibility
# We are now building images using Nix (https://nixos.org)
# Building using this Dockerfile is discouraged, it may also be flimsy

from nixpkgs/nix as builder

env NIX_PATH="nixpkgs=channel:nixos-20.09"

workdir /src

# You have to edit this to actually copy project sources over
copy default.nix .

run nix build \
    --print-build-logs \
    --option filter-syscalls false \
    --option keep-build-log false \
    --option max-jobs auto \
    --option sandbox false \
 && mkdir /archive \
 && tar zxf ./result -C /archive \
 && mkdir /fs \
 && nix run nixpkgs.jq -c jq -r '.[0].Layers[]' /archive/manifest.json \
  | nix run nixpkgs.findutils -c xargs -i tar xf /archive/{} -C /fs

from scratch as runner

copy --from=builder /fs /

# You might need to set CMD or ENTRYPOINT here
14:57:43

Show newer messages


Back to Room ListRoom Version: 6