docs: dashification guix/INSTALL.md and added Dockerfile for guix

Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com>
This commit is contained in:
Konstantin Akimov 2023-03-24 02:24:26 +07:00 committed by PastaPastaPasta
parent f54ec9cde7
commit f9508cb532
2 changed files with 67 additions and 8 deletions

59
contrib/guix/Dockerfile Normal file
View File

@ -0,0 +1,59 @@
FROM alpine:3.17
RUN apk --no-cache --update add \
bash \
bzip2 \
ca-certificates \
curl \
git \
make \
shadow
ARG guix_download_path=ftp://ftp.gnu.org/gnu/guix
ARG guix_version=1.4.0
ARG guix_checksum_aarch64=72d807392889919940b7ec9632c45a259555e6b0942ea7bfd131101e08ebfcf4
ARG guix_checksum_x86_64=236ca7c9c5958b1f396c2924fcc5bc9d6fdebcb1b4cf3c7c6d46d4bf660ed9c9
ARG builder_count=32
ENV PATH /root/.config/guix/current/bin:$PATH
# Application Setup
# https://guix.gnu.org/manual/en/html_node/Application-Setup.html
ENV GUIX_LOCPATH /root/.guix-profile/lib/locale
ENV LC_ALL en_US.UTF-8
RUN guix_file_name=guix-binary-${guix_version}.$(uname -m)-linux.tar.xz && \
eval "guix_checksum=\${guix_checksum_$(uname -m)}" && \
cd /tmp && \
wget -q -O "$guix_file_name" "${guix_download_path}/${guix_file_name}" && \
echo "${guix_checksum} ${guix_file_name}" | sha256sum -c && \
tar xJf "$guix_file_name" && \
mv var/guix /var/ && \
mv gnu / && \
mkdir -p ~root/.config/guix && \
ln -sf /var/guix/profiles/per-user/root/current-guix ~root/.config/guix/current && \
source ~root/.config/guix/current/etc/profile
# Guix expects this file to exist
RUN touch /etc/nsswitch.conf
RUN guix archive --authorize < ~root/.config/guix/current/share/guix/ci.guix.gnu.org.pub
# Build Environment Setup
# https://guix.gnu.org/manual/en/html_node/Build-Environment-Setup.html
RUN groupadd --system guixbuild
RUN for i in $(seq -w 1 ${builder_count}); do \
useradd -g guixbuild -G guixbuild \
-d /var/empty -s $(which nologin) \
-c "Guix build user ${i}" --system \
"guixbuilder${i}" ; \
done
CMD ["/root/.config/guix/current/bin/guix-daemon","--build-users-group=guixbuild"]
RUN git clone https://github.com/dashpay/dash.git /dash
RUN mkdir base_cache sources SDKs
WORKDIR /dash

View File

@ -18,8 +18,8 @@ Otherwise, you may choose from one of the following options to install Guix:
- Works on nearly all Linux distributions
- Installs any release
- Binary installation only, requires high level of trust
3. Using fanquake's **Docker image** [↗︎ external instructions][install-fanquake-docker]
- Maintained by fanquake
3. Using **Docker image** [↗︎ external instructions][install-docker]
- Maintained by pastapastapasta
- Easy (automatically performs *some* setup)
- Works wherever Docker images work
- Installs any release
@ -57,10 +57,10 @@ Regardless of which installation option you chose, the changes to
`/etc/profile.d` will not take effect until the next shell or desktop session,
so you should log out and log back in.
## Option 3: Using fanquake's Docker image
## Option 3: Using Docker image
Please refer to fanquake's instructions
[here](https://github.com/fanquake/core-review/tree/master/guix).
Please refer to Docker's image
[here](https://github.com/dashpay/dash/tree/master/contrib/guix/Dockerfile).
Note that the `Dockerfile` is largely equivalent to running through the binary
tarball installation steps.
@ -480,7 +480,7 @@ in the Guix Reference Manual for more details.
## Optional setup
At this point, you are set up to [use Guix to build Bitcoin
At this point, you are set up to [use Guix to build Dash
Core](./README.md#usage). However, if you want to polish your setup a bit and
make it "what Guix intended", then read the next few subsections.
@ -488,7 +488,7 @@ make it "what Guix intended", then read the next few subsections.
This section definitely does not apply to you if you installed Guix using:
1. The shell installer script
2. fanquake's Docker image
2. Docker image
3. Debian's `guix` package
#### Background
@ -801,7 +801,7 @@ Please see the following links for more details:
[install-script]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball
[install-bin-tarball]: #options-1-and-2-using-the-official-shell-installer-script-or-binary-tarball
[install-fanquake-docker]: #option-3-using-fanquakes-docker-image
[install-docker]: #option-3-using-docker-image
[install-distro-pkg]: #option-4-using-a-distribution-maintained-package
[install-source]: #option-5-building-from-source