Ensure /bin->/guix-builder/bin exists within the container

This commit is contained in:
Collin J. Doering 2023-12-28 20:55:50 -05:00
parent 75361f9a8a
commit d1b46ce129
Signed by: rekahsoft
GPG Key ID: 7B4DEB93212B3022
4 changed files with 12 additions and 5 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
*~
*.tar.gz

View File

@ -1,7 +1,6 @@
FROM scratch
FROM scratch as builder
ADD guix-tarball-pack.tar.gz /guix-builder
ENV PATH=/guix-builder/bin
ADD links.tar.gz /
VOLUME /var/guix/daemon-socket/socket /gnu/store /etc/ssl
ENTRYPOINT ["/guix-builder/bin/bash"]

View File

@ -4,14 +4,20 @@ GUIX_MANIFEST := manifest.scm
GUIX_MANIFEST_DEV := manifest-dev.scm
TARBALL ?= guix-tarball-pack.tar.gz
LINKS_TARBALL ?= links.tar.gz
IMAGE_TAG ?= guix-builder
$(LINKS_TARBALL):
ln -s /guix-builder/bin bin
tar -czvf links.tar.gz bin
rm bin
$(TARBALL):
@cp $$(guix pack -R -S /bin=bin -S /etc/ssl=etc/ssl -m $(GUIX_MANIFEST)) $@
@chmod +w $@
.PHONY: build
build: $(TARBALL)
build: $(TARBALL) $(LINKS_TARBALL)
@docker build -t $(IMAGE_TAG) .
.PHONY: run
@ -30,4 +36,4 @@ shell:
.PHONY:
clean:
rm $(TARBALL)
rm -r $(TARBALL) $(LINKS_TARBALL)

View File

@ -1,3 +1,4 @@
(specifications->manifest
(list "make"
"tar"
"docker-cli"))