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: Thu, 28 Nov 2019 10:53:05 -0600

BTW, I saw your comments in the Docker/Guix relationship thread about using
`guix pack` as an alternative means to produce a Docker image. I tried this
also, but I had a few issues:

1) You have to pass it `-S /bin=bin -S /sbin=sbin` flags so that command
binaries can be conveniently located. This is not really an issue, but I
think it does "lock" the resulting image to a particular snapshot of
command binaries, which might be precisely what you want for an immutable
container for a production application. But for other use cases, for
example, for throw-away containers for development and testing, you might
want the capability of being able to upgrade packages, and it's not clear
to me if it's just as simple as replacing the symlinks to the `bin` and
`sbin` directories of a new profile. And also, I guess `guix environment`
addresses that use case.

2) In order to get a lot of basic functionality working, I had to install a
Guix System into a VM from the distribution ISO, then copy various bits of
its `/etc` (protocols, services, nsswitch.conf, pam.d, etc.) tree into an
image to get network diagnostics (ping, etc.) and user management commands,
among others, working. It seems like leveraging the `guix system`
infrastructure to build a working, reproducible, and standard `/etc` tree
is the way to go, but as already noted I'm not having any luck with the
Docker images it produces.

On Wed, Nov 27, 2019 at 11:40 PM Stephen Scheck <address@hidden>
wrote:

> No, it does not:
>
> $ docker run -it system:0qjxd5ljsh316ki7wqkk2xz9b68lynh2 bash
> docker: Error response from daemon: OCI runtime create failed:
> container_linux.go:348: starting container process caused "exec: \"bash\":
> executable file not found in $PATH": unknown.
>
> It seems like some things which get set up when creating a regular system
> via `guix system` do not when specifying output as a Docker image.
> Unfortunately, the documentation doesn't explain much about how the system
> profile works, and I'm not knowledgeable enough about Guix to make an
> informed guess.
>
> On Wed, Nov 27, 2019 at 9:39 AM zimoun <address@hidden> wrote:
>
>> Hi,
>>
>> On Sun, 17 Nov 2019 at 18:17, Stephen Scheck <address@hidden>
>> wrote:
>>
>> >     $ docker run -it system:0qjxd5ljsh316ki7wqkk2xz9b68lynh2
>> > /run/current-system/profile/bin/bash --login
>> >     docker: Error response from daemon: OCI runtime create failed:
>> > container_linux.go:348: starting container process caused "exec:
>> > \"/run/current-system/profile/bin/bash\": stat
>> > /run/current-system/profile/bin/bash: no such file or directory":
>> unknown.
>>
>> Does the command
>>
>>     docker run -it system:0qjxd5ljsh316ki7wqkk2xz9b68lynh2 bash
>>
>> work?
>>
>>
>> All the best,
>> simon
>>
>


reply via email to

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