feat: add filesystem package

This commit is contained in:
Lance R. Vick 2024-02-27 17:17:20 -08:00
parent 4e80f9270a
commit 9f98046c2e
No known key found for this signature in database
GPG key ID: 8E47A1EC35A1551D
2 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,32 @@
FROM scratch as build
COPY --from=stagex/stage3 . /
WORKDIR rootfs
RUN <<-EOF
install -d -m0750 root
install -d -m0644 etc
install -d -m0644 usr
install -d -m1777 tmp
install -d -m1777 var/tmp
install -d -m1777 spool/mail
install -o 1000:1000 -d -m0755 /home/user
ln -sT usr/lib lib64
ln -sT usr/lib lib
ln -sT usr/bin bin
ln -sT usr/sbin sbin
ln -sT lib usr/lib64
ln -sT ../run var/run
ln -sT ../run/lock var/lock
EOF
COPY --chmod=644 <<-EOF etc/passwd
root:x:0:0:root:/root:/bin/sh
user:x:1000:1000::/home/user:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
EOF
COPY --chmod=644 <<-EOF etc/group
root:x:0:
user:x:1000:
EOF
RUN find /rootfs -exec touch -hcd "@0" "{}" +
FROM scratch as package
COPY --from=build /rootfs /

View file

@ -292,6 +292,13 @@ out/file/index.json: \
out/perl/index.json
$(call build,file)
.PHONY: filesystem
filesystem: out/filesystem/index.json
out/filesystem/index.json: \
packages/filesystem/Containerfile \
out/stage3/index.json
$(call build,filesystem)
.PHONY: findutils
findutils: out/findutils/index.json
out/findutils/index.json: \