On 26/10/16 21:51, Ludovic Courtès wrote:
Ricardo Wurmus <rek...@elephly.net> skribis:

Ludovic Courtès <l...@gnu.org> writes:

What they suggest is to add Guix support simply by using Guix inside of
Docker…  Obviously, I’m not a fan of this because of how inelegant this
all seems.  When it comes to bringing Guix to Galaxy I think we have
cultural problems to overcome, not really technical issues.
Well, if this approach allows us to demonstrate the improvements Guix
can bring (and to sidestep the cultural differences), it may be a good
idea to try it.

Has anyone ever managed to get Guix to work inside docker? I attempted it as I intend on submitting some applications to kbase[0,1], where developers submit docker files to run their applications within the "narrative" interface i.e. web-facing interfaces to bioinformatic tools. I failed I think because of docker's single-process restriction. Using the attached (straightforward) dockerfile it fails at this step:

RUN echo "nohup ~root/.guix-profile/bin/guix-daemon --build-users-group=guixbuild &" > /tmp/daemon-script.sh
RUN bash /tmp/daemon-script.sh; guix pull
...
guix pull: error: build failed: cloning builder process: Operation not permitted

That seems to suggest that we cannot run the daemon inside a docker container, so I suppose we'd have to fall back on copying files from a store built outside docker-land, right?

Thanks, ben



[0]: http://kbase.us/
[1]: https://github.com/kbase/user_docs/blob/master/kbase-architecture.md
###################################################################
# Dockerfile
#
# Version:          1
# Software:         GNU Guix
# Software Version: 0.11.0-ubuntu14.04
###################################################################

# Base image as Unbuntu
FROM ubuntu:14.04

RUN apt-get update
RUN apt-get -y install wget
RUN apt-get -y install build-essential

# Install Guix from binary
RUN cd /tmp && wget 
ftp://alpha.gnu.org/gnu/guix/guix-binary-0.11.0.x86_64-linux.tar.xz
RUN cd /tmp && wget 
ftp://alpha.gnu.org/gnu/guix/guix-binary-0.11.0.x86_64-linux.tar.xz.sig

RUN gpg --keyserver pgp.mit.edu --recv-keys 090B11993D9AEBB5
RUN gpg --verify /tmp/guix-binary-0.11.0.x86_64-linux.tar.xz.sig

RUN tar --warning=no-timestamp -xf /tmp/guix-binary-0.11.0.x86_64-linux.tar.xz

RUN ln -sf /var/guix/profiles/per-user/root/guix-profile ~root/.guix-profile

RUN groupadd --system guixbuild
RUN for i in `seq -w 1 10`; do useradd -g guixbuild -G guixbuild -d /var/empty 
-s `which nologin` -c "Guix build user $i" --system guixbuilder$i; done

RUN mkdir -p /usr/local/bin
RUN ln -s /var/guix/profiles/per-user/root/guix-profile/bin/guix /usr/local/bin

# Authorize hydra. Perhaps unnecessary in the future.
RUN guix archive --authorize < ~root/.guix-profile/share/guix/hydra.gnu.org.pub

# Start the daemon manually
RUN echo "nohup ~root/.guix-profile/bin/guix-daemon 
--build-users-group=guixbuild &" > /tmp/daemon-script.sh
RUN bash /tmp/daemon-script.sh; guix pull

Reply via email to