From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Scheck Subject: Re: Docker image not working Date: Thu, 28 Nov 2019 10:53:05 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34760) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iaN2k-00062D-44 for help-guix@gnu.org; Thu, 28 Nov 2019 11:53:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iaN2f-0000d3-EW for help-guix@gnu.org; Thu, 28 Nov 2019 11:53:23 -0500 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]:38599) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iaN2e-0000Ma-RW for help-guix@gnu.org; Thu, 28 Nov 2019 11:53:21 -0500 Received: by mail-lj1-x235.google.com with SMTP id k8so18636769ljh.5 for ; Thu, 28 Nov 2019 08:53:19 -0800 (PST) In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: zimoun Cc: help-guix 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 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 wrote: > >> Hi, >> >> On Sun, 17 Nov 2019 at 18:17, Stephen Scheck >> 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 >> >