Re: Running docker in a mock chroot

2014-11-06 Thread Radek Holy
- Original Message -
> From: "Miroslav Suchý" 
> To: devel@lists.fedoraproject.org
> Sent: Thursday, November 6, 2014 10:31:31 AM
> Subject: Re: Running docker in a mock chroot
> 
> On 11/05/2014 11:45 PM, Dridi Boukelmoune wrote:
> > I haven't really tried, I only wanted to look at fig 1.0 currently in
> > f21 updates-testing. So I --shell'ed inside my fedora-21-x86_64
> > mock chroot after installing fig, and tried to start a docker daemon
> > in the background but it failed.
> 
> --shell was never meant as "give me isolated environment for my dirty
> testing". It is present in mock, to give you
> ability to investigate what is wrong with your failing builds and debug your
> scriptlets.

Hate to hear it :-(

> > detail at how mock creates the chroots,
> 
> It just create some files needed to run builds , symlink few /proc files and
> chroot there. Nothing less, nothing more.
> 
> Since version mock-1.2.0 there is new option --new-chroot, which will use
> systemd-nspawn instead of chroot.
> It is not enabled by default as it breaks some existing scripts.
>
> > I was just wondering whether it was actually possible to run docker
> > in a chroot, especially one built with mock!

Yes, it was possible when I tried it few months ago according to instructions 
from someone else. IIRC, it included several cgroup mounts and a Mock 
workaround. Nothing I would recommend.
-- 
Radek Holý
Associate Software Engineer
Software Management Team
Red Hat Czech
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Running docker in a mock chroot

2014-11-06 Thread Josef Stribny
> If I need to use a VM, I will (any news for vagrant?) 

The f20 Copr[0] should pretty much work, and we are close to finalize a package 
for f22
(we have some bundler issues we need to workaround).

[0] http://copr.fedoraproject.org/coprs/jstribny/vagrant-f20/

Josef

- Original Message -
From: "Dridi Boukelmoune" 
To: "Development discussions related to Fedora" 
, fig-ow...@fedoraproject.org
Sent: Wednesday, November 5, 2014 11:45:45 PM
Subject: Running docker in a mock chroot

Hi,

I haven't really tried, I only wanted to look at fig 1.0 currently in
f21 updates-testing. So I --shell'ed inside my fedora-21-x86_64
mock chroot after installing fig, and tried to start a docker daemon
in the background but it failed.

   # docker -d -H unix:///var/run/docker.sock &
   2014/11/05 23:08:33 docker daemon: 1.3.0 c78088f/1.3.0; execdriver:
   native; graphdriver:
   [45f3a6fd] +job serveapi(unix:///var/run/docker.sock)
   [error] attach_loopback.go:42 There are no more loopback devices available.
   2014/11/05 23:08:33 loopback mounting failed

If I need to use a VM, I will (any news for vagrant?) but I was
wondering whether this was actually possible. I haven't looked in
detail at how mock creates the chroots, and don't have time to dig
at all these days.

I was just wondering whether it was actually possible to run docker
in a chroot, especially one built with mock!

Cheers,
Dridi
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Running docker in a mock chroot

2014-11-06 Thread Miroslav Suchý

On 11/05/2014 11:45 PM, Dridi Boukelmoune wrote:

I haven't really tried, I only wanted to look at fig 1.0 currently in
f21 updates-testing. So I --shell'ed inside my fedora-21-x86_64
mock chroot after installing fig, and tried to start a docker daemon
in the background but it failed.


--shell was never meant as "give me isolated environment for my dirty testing". It is present in mock, to give you 
ability to investigate what is wrong with your failing builds and debug your scriptlets.



detail at how mock creates the chroots,


It just create some files needed to run builds , symlink few /proc files and 
chroot there. Nothing less, nothing more.

Since version mock-1.2.0 there is new option --new-chroot, which will use 
systemd-nspawn instead of chroot.
It is not enabled by default as it breaks some existing scripts.

--
Miroslav Suchy, RHCE, RHCDS
Red Hat, Senior Software Engineer, #brno, #devexp, #fedora-buildsys
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Running docker in a mock chroot

2014-11-06 Thread Tomas Tomecek
Quoting Dridi Boukelmoune (2014-11-05 23:45:45)
> Hi,
> 
> I haven't really tried, I only wanted to look at fig 1.0 currently in
> f21 updates-testing. So I --shell'ed inside my fedora-21-x86_64
> mock chroot after installing fig, and tried to start a docker daemon
> in the background but it failed.
> 
># docker -d -H unix:///var/run/docker.sock &
>2014/11/05 23:08:33 docker daemon: 1.3.0 c78088f/1.3.0; execdriver:
>native; graphdriver:
>[45f3a6fd] +job serveapi(unix:///var/run/docker.sock)
>[error] attach_loopback.go:42 There are no more loopback devices available.
>2014/11/05 23:08:33 loopback mounting failed
> 
> If I need to use a VM, I will (any news for vagrant?) but I was
> wondering whether this was actually possible. I haven't looked in
> detail at how mock creates the chroots, and don't have time to dig
> at all these days.
> 
> I was just wondering whether it was actually possible to run docker
> in a chroot, especially one built with mock!
> 
> Cheers,
> Dridi
> -- 
> devel mailing list
> devel@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/devel
> Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Hi, this could help you:

https://github.com/jpetazzo/dind/issues/19

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: Running docker in a mock chroot

2014-11-05 Thread Daniel J Walsh

On 11/05/2014 05:45 PM, Dridi Boukelmoune wrote:
> Hi,
>
> I haven't really tried, I only wanted to look at fig 1.0 currently in
> f21 updates-testing. So I --shell'ed inside my fedora-21-x86_64
> mock chroot after installing fig, and tried to start a docker daemon
> in the background but it failed.
>
># docker -d -H unix:///var/run/docker.sock &
>2014/11/05 23:08:33 docker daemon: 1.3.0 c78088f/1.3.0; execdriver:
>native; graphdriver:
>[45f3a6fd] +job serveapi(unix:///var/run/docker.sock)
>[error] attach_loopback.go:42 There are no more loopback devices available.
>2014/11/05 23:08:33 loopback mounting failed
>
> If I need to use a VM, I will (any news for vagrant?) but I was
> wondering whether this was actually possible. I haven't looked in
> detail at how mock creates the chroots, and don't have time to dig
> at all these days.
>
> I was just wondering whether it was actually possible to run docker
> in a chroot, especially one built with mock!
>
> Cheers,
> Dridi
Probably missing /dev/loop* within mock chroot.  Otherthen this it
should probably work.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Running docker in a mock chroot

2014-11-05 Thread Dridi Boukelmoune
Hi,

I haven't really tried, I only wanted to look at fig 1.0 currently in
f21 updates-testing. So I --shell'ed inside my fedora-21-x86_64
mock chroot after installing fig, and tried to start a docker daemon
in the background but it failed.

   # docker -d -H unix:///var/run/docker.sock &
   2014/11/05 23:08:33 docker daemon: 1.3.0 c78088f/1.3.0; execdriver:
   native; graphdriver:
   [45f3a6fd] +job serveapi(unix:///var/run/docker.sock)
   [error] attach_loopback.go:42 There are no more loopback devices available.
   2014/11/05 23:08:33 loopback mounting failed

If I need to use a VM, I will (any news for vagrant?) but I was
wondering whether this was actually possible. I haven't looked in
detail at how mock creates the chroots, and don't have time to dig
at all these days.

I was just wondering whether it was actually possible to run docker
in a chroot, especially one built with mock!

Cheers,
Dridi
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct