help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Docker image not working


From: Stephen Scheck
Subject: Re: Docker image not working
Date: Sat, 30 Nov 2019 09:06:31 -0600

I think the problem is that I was using an outdated version of `guix`. I
did a `guix pull` on my Guix system, the re-ran the command to build the
Docker image, and it works now.

One thing I noticed is that I have to pass the `--privileged` flag, or
subsequent invocations of `guix pull` fail with some error about failure to
clone the process:

    $ docker run -it --privileged --tty guix:latest
    making '/gnu/store/dn2247g52nv2vc3y578fm2ksrh8s00hn-system' the current
system...
    setting up setuid programs in '/run/setuid-programs'...
    populating /etc from /gnu/store/c3z6qji00a216xrjrf10sd3vr97ajr60-etc...
    error in finalization thread: Success
    error in finalization thread: Bad file descriptor
    error in finalization thread: Bad file descriptor
    error in finalization thread: Bad file descriptor

I'm not sure why the finalization errors are reported, but they don't seem
to cause problems. I can then do e.g.

    $ docker exec -it <container-id> /run/current-system/profile/bin/bash
--login
    root@guix /#

Thanks for your help!

On Thu, Nov 28, 2019 at 8:35 PM Maxim Cournoyer <address@hidden>
wrote:

> Hello Stephen,
>
> Stephen Scheck <address@hidden> writes:
>
> > I don't think the docs are quite up to date, or perhaps refer to an older
> > version of Docker. If I do:
> >
> >     $ docker create system:0qjxd5ljsh316ki7wqkk2xz9b68lynh2
> >     Error response from daemon: No command specified
> >
> > Looks like `docker create` wants the entry point, hence why I tried to
> use
> > `docker run` to fire up the container ... so what should it be to kick
> off
> > the Shepherd service you referred to?
> >
> > Thanks.
>
> The documentation works for me, with a minor hiccup: the docker load
> doesn't return *just* the image ID: the first two words must be cut out
> (by piping it to awk '{ print $3 }' for example).
>
> --8<---------------cut here---------------start------------->8---
> guix system docker-image some-system-with-python.scm
> [...]
> /gnu/store/5ddyv2m6kfjhm0fc3v181ahs35hkf6j6-guix-docker-image.tar.gz
>
> image_id=`docker load <
> /gnu/store/5ddyv2m6kfjhm0fc3v181ahs35hkf6j6-guix-docker-image.tar.gz`
> $ echo $image_id
> Loaded image: guix:latest
> $ container_id=`docker create $image_id`
> invalid reference format: repository name must be lowercase
> $ image_id="guix:latest"
> $ container_id=`docker create $image_id`
> $ echo $container_id
> 9eabc3cae4bba25848c7f1ced15086232a5b19a2e5d775374e842855890d51f3
> $ docker start $container_id
> 9eabc3cae4bba25848c7f1ced15086232a5b19a2e5d775374e842855890d51f3
> $ docker exec -ti $container_id /run/current-system/profile/bin/bash
> --login
> root@9eabc3cae4bb /# which python
> which python
> /run/current-system/profile/bin/python
> root@9eabc3cae4bb /# python --version
> python --version
> Python 3.7.4
> --8<---------------cut here---------------end--------------->8---
>
> I also tested with your operating system declaration and it also worked:
>
> --8<---------------cut here---------------start------------->8---
> docker load <
> /gnu/store/49cgpsq6978j7f9l7fk3pw8f1dldlyv3-guix-docker-image.tar.gz
> c2cd1fc572fa: Loading layer
> [==================================================>]    631MB/631MB
> The image guix:latest already exists, renaming the old one with ID
> sha256:fb0dc0872f71e5051f316b36f1f12ef71a7eb88a77b16fbf86fff66258cce885 to
> empty string
> Loaded image: guix:latest
> $ ~/src/guix-master [env]$ docker create guix:latest
> 25c6b88a578270aec4bd20f7050f591b9f971397f77282ae826fe6f488b125c6
> $ docker start
> 25c6b88a578270aec4bd20f7050f591b9f971397f77282ae826fe6f488b125c6
> 25c6b88a578270aec4bd20f7050f591b9f971397f77282ae826fe6f488b125c6
> $ docker exec -ti
> 25c6b88a578270aec4bd20f7050f591b9f971397f77282ae826fe6f488b125c6
> /run/current-system/profile/bin/bash --login
> root@25c6b88a5782 /#
> --8<---------------cut here---------------end--------------->8---
>
> Sorry, I'm not sure what is wrong on your side.  I've seen this error
> before but can't remember what the solution was :-/.  Perhaps something
> doesn't work right with your Docker daemon?
>
> HTH,
>
> Maxim
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]