help-guix
[Top][All Lists]
Advanced

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

Re: Docker image not working


From: Maxim Cournoyer
Subject: Re: Docker image not working
Date: Fri, 29 Nov 2019 11:35:35 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

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]