lz4 test (and better build)

This commit is contained in:
Mikaël Cluseau
2023-12-17 14:28:32 +01:00
parent 12bfa6cfd6
commit d69f2f27ee
3 changed files with 14 additions and 4 deletions

View File

@ -9,7 +9,9 @@ run go test ./...
run go build -o /go/bin/init -trimpath .
# ------------------------------------------------------------------------
from alpine:3.18.4
from alpine:3.18.4 as initrd
run apk add --no-cache xz
workdir /layer
run wget -O- https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-minirootfs-3.18.4-x86_64.tar.gz |tar zxv
@ -22,4 +24,9 @@ copy --from=build /go/bin/init .
# check viability
run chroot /layer /init hello
entrypoint ["sh","-c","find |cpio -H newc -o |base64"]
run find |cpio -H newc -o >/initrd
# ------------------------------------------------------------------------
from alpine:3.18.4
copy --from=initrd /initrd /
entrypoint ["base64","/initrd"]