Skip to content

Instantly share code, notes, and snippets.

@kalbasit
Created July 29, 2019 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kalbasit/9a77de53ece6e29f7f8b3c0ba864c005 to your computer and use it in GitHub Desktop.
Save kalbasit/9a77de53ece6e29f7f8b3c0ba864c005 to your computer and use it in GitHub Desktop.
$ nix-build --option builders '' release.nix -A nginx-base-image
these derivations will be built:
/nix/store/kwdab4133gn8fc4c6srd3grp0d7s4j3y-docker-layer-kt-nginx-base.drv
/nix/store/0302a375pxd9hcpvmppd98myibc6278x-runtime-deps.drv
/nix/store/7dyrkv6n658gfxf0mi6fx5sca9a0p413-docker-image-kt-nginx-base.tar.gz.drv
building '/nix/store/kwdab4133gn8fc4c6srd3grp0d7s4j3y-docker-layer-kt-nginx-base.drv'...
Formatting '/nix/store/jvrmd47h1a1ndhvll2rlv04b12aqx4z3-docker-layer-kt-nginx-base/disk-image.qcow2', fmt=qcow2 size=1073741824 cluster_size=65536 lazy_refcounts=off refcount_bits=16
cSeaBIOS (version rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org)
iPXE (http://ipxe.org) 00:03.0 C980 PCI2.10 PnP PMM+1FF91160+1FEF1160 C980
Booting from ROM...
Probing EDD (edd=off to disable)... ocloading kernel modules...
insmod: can't insert '/nix/store/rna6nyy67yn0bahmmcfdjh8l8912wjrs-linux-4.19.60-shrunk/lib/modules/4.19.60/kernel/arch/x86/crypto/crc32c-intel.ko.xz': No such device
warning: unable to load /nix/store/rna6nyy67yn0bahmmcfdjh8l8912wjrs-linux-4.19.60-shrunk/lib/modules/4.19.60/kernel/arch/x86/crypto/crc32c-intel.ko.xz
mounting Nix store...
mounting host's temporary directory...
starting stage 2 (/nix/store/zgiwi4pz2d0b84bz9hkghwhfg5s98yil-vm-run-stage2)
mke2fs 1.45.2 (27-May-2019)
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: f3ea1444-61bb-4d9d-aee2-697c4a732540
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
Executing pre-mount steps...
Adding contents...
Adding /nix/store/gqgwwsqb9ar19by8b498cr1ciqna189k-nginx-1.16.0...
Executing post-mount steps...
Packing layer...
Computing checksum...
Finished building layer 'kt-nginx-base'
[ 1.362795] reboot: Power down
Unexpected error in raw_reconfigure_getfd() at block/file-posix.c:923:
qemu-system-x86_64: Could not reopen file: No such file or directory
./run-vm: line 5: 12 Aborted /nix/store/wwsl0p0z4r33zkl5ihw1d8781m7077ph-qemu-host-cpu-only-4.0.0/bin/qemu-kvm -cpu kvm64 -nographic -no-reboot -device virtio-rng-pci -virtfs local,path=/nix/store,security_model=none,mount_tag=store -virtfs local,path=/build/xchg,security_model=none,mount_tag=xchg -drive file=/nix/store/jvrmd47h1a1ndhvll2rlv04b12aqx4z3-docker-layer-kt-nginx-base/disk-image.qcow2,if=virtio,cache=unsafe,werror=report -kernel /nix/store/ihcn6fg7icv2x5rriqnaqp5h1gfbfqws-linux-4.19.60/bzImage -initrd /nix/store/5gv6fnr0b9s4lpqxxq9yg6bymsq0rrxz-initrd/initrd -append "console=ttyS0 panic=1 command=/nix/store/zgiwi4pz2d0b84bz9hkghwhfg5s98yil-vm-run-stage2 out=/nix/store/jvrmd47h1a1ndhvll2rlv04b12aqx4z3-docker-layer-kt-nginx-base mountDisk= loglevel=4" -m 512
builder for '/nix/store/kwdab4133gn8fc4c6srd3grp0d7s4j3y-docker-layer-kt-nginx-base.drv' failed with exit code 134
cannot build derivation '/nix/store/7dyrkv6n658gfxf0mi6fx5sca9a0p413-docker-image-kt-nginx-base.tar.gz.drv': 1 dependencies couldn't be built
error: build of '/nix/store/7dyrkv6n658gfxf0mi6fx5sca9a0p413-docker-image-kt-nginx-base.tar.gz.drv' failed
{
nginx-base-image = dockerTools.buildImage {
name = "kt-nginx-base";
tag = "latest";
contents = nginx;
runAsRoot = ''
#! ${stdenv.shell}
${dockerTools.shadowSetup}
groupadd --system nginx
useradd --system --gid nginx nginx
'';
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment