2023-12-29 16:30:17 +00:00
|
|
|
FROM scratch
|
2024-01-02 04:18:40 +00:00
|
|
|
|
|
|
|
# Extract guix produced relocatable
|
2023-07-15 20:37:59 +00:00
|
|
|
ADD guix-tarball-pack.tar.gz /guix-builder
|
2024-01-02 04:18:40 +00:00
|
|
|
|
|
|
|
# Extract variety of links to be setup in root, pointing into /guix-builder
|
2023-12-29 01:55:50 +00:00
|
|
|
ADD links.tar.gz /
|
2024-01-02 04:18:40 +00:00
|
|
|
|
2023-12-29 17:03:48 +00:00
|
|
|
ADD passwd /etc/passwd
|
2024-01-02 04:18:40 +00:00
|
|
|
|
|
|
|
# Create an empty directory for use by proot
|
|
|
|
#
|
|
|
|
# Any following RUN command or command in the container will not run without the below PROOT
|
|
|
|
# env var set, and the directory existing
|
2023-12-30 02:32:46 +00:00
|
|
|
ADD passwd /tmp/proot/delete-me
|
2024-01-02 04:18:40 +00:00
|
|
|
ENV PROOT_TMP_DIR=/tmp/proot
|
2023-12-30 02:32:46 +00:00
|
|
|
|
2024-01-02 04:18:40 +00:00
|
|
|
# Setup ssl and glibc-locales environment variables
|
2023-12-31 20:01:01 +00:00
|
|
|
ENV SSL_CERT_DIR=/etc/ssl/certs
|
|
|
|
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
|
2023-12-31 19:20:47 +00:00
|
|
|
ENV GUIX_LOCPATH=/guix-builder/lib/locale
|
2024-01-02 04:18:40 +00:00
|
|
|
|
|
|
|
# Remove the empty file that was used to create a temporary directory, and adjust file
|
|
|
|
# permissions
|
|
|
|
RUN rm /tmp/proot/delete-me \
|
|
|
|
&& chown -PR 0:0 /etc /bin
|
2023-07-15 20:37:59 +00:00
|
|
|
|
|
|
|
VOLUME /var/guix/daemon-socket/socket /gnu/store /etc/ssl
|
2024-01-02 01:34:58 +00:00
|
|
|
CMD ["/guix-builder/bin/bash"]
|