grilumops/25-env/testing/docker/alpine/Dockerfile

52 lines
2.1 KiB
Docker

# Inspired by https://github.com/bmpvieira/Dockerfiles credit Bruno Viera <https://github.com/bmpvieira>
#@ All rights reserved (C) Jacob Hrbek <rsa4096/0x31AE4020956E0A9A> in 30/10/2021-EU 01:22:40 UTC
###! REMOVE(Krey): Scheduled for removal as alpine doesn't have `groupadd` for the script to work
# 30/10/2021-EU 01:25:30 UTC
FROM alpine:3.14.2
LABEL Description="Minimal Alpine Linux Image with GUIX package manager designed for testing"
# 30/10/2021-EU 01:24:54 UTC
LABEL Version="30102021012454"
# OUTSOURCED: Guix's official way to install the package manager on non-GUIX system is using https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
ENV guixInstall_commit="e4ed0b3969ddbe44347c468c96ccfa057b2dd256"
RUN true \
&& wget "https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh?id=$guixInstall_commit" -o guix-install.sh \
# Add guix-install dependencies
&& apk add \
bash \
gnupg \
# DEPRECATED(Krey): alpine doesn't have groupadd
groupadd \
xz \
&& chmod +x guix-install.sh \
&& exec guix-install.sh
# ENV guixVersion="0.8.3"
# # Get GUIX on the system
# RUN true \
# && wget "ftp://alpha.gnu.org/gnu/guix/guix-binary-$guixVersion.x86_64-linux.tar.xz" \
# && tar xpf guix-binary-$guixVersion.x86_64-linux.tar.xz -C guix-binary-0.8.3.x86_64-linux.tar.xz
# # Add guix
# ENV PATH /root/.guix-profile/bin:$PATH
# RUN cd /tmp
# RUN wget ftp://alpha.gnu.org/gnu/guix/guix-binary-0.8.3.x86_64-linux.tar.xz
# RUN tar xJf guix-binary-0.8.3.x86_64-linux.tar.xz
# RUN mv var/guix /var/ && mv gnu /
# RUN ln -sf /var/guix/profiles/per-user/root/guix-profile ~root/.guix-profile
# RUN guix archive --authorize < ~root/.guix-profile/share/guix/hydra.gnu.org.pub
# RUN addgroup guixbuild
# RUN addgroup guix-builder
# RUN chgrp guix-builder -R /gnu/store
# RUN chmod 1775 /gnu/store
# RUN builders=10 ;\
# for i in `seq 1 $builders` ; do \
# adduser -S guix-builder$i guix-builder ;\
# adduser guix-builder$i guix-builder ;\
# done
# CMD guix-daemon --build-users-group=guix-builder
# # RUN guix-daemon --build-users-group=guix-builder & guix pull