New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow docker containers to act more like LXC containers rather than application wrappers #2170

Closed
benbooth493 opened this Issue Oct 11, 2013 · 17 comments

Comments

Projects
None yet
10 participants
@benbooth493

benbooth493 commented Oct 11, 2013

I've been using LXC containers in the traditional sense for a while now. I use them for self-contained, development environments.
I am currently able to have a puppet agent running inside each container which allows them to be built up using manifests similar to my live environment.
I really like docker and it would certainly ease the admin side of spinning up containers, but it seems that docker is focussed more on wrapping up an application rather than providing a VPS / "chroot on steroids". I'd love to be able to run multiple services inside a docker container, which would also require multiple virtual network interfaces per container.

Is it possible to use docker in this way?

Thanks

@shykes

This comment has been minimized.

Show comment
Hide comment
@shykes

shykes Oct 11, 2013

Collaborator

Hi Ben, you can use docker in what I call "machine mode" by simply
executing /sbin/init.

Something like "docker run -p 22 -d MYIMAGE /sbin/init" should start the
init process in the background and, provided it starts a ssh daemon, will
make sure it's available on a public port.

I hope this helps.

On Fri, Oct 11, 2013 at 12:05 AM, Ben Booth notifications@github.comwrote:

I've been using LXC container in the traditional sense for a while now. I
use them for self-contained, development environments.
I am currently able to have a puppet agent running inside each container
which allows them to be built up using manifests similar to my live
environment.
I really like docker and it would certainly each to admin side of spinning
up containers, but it seems that docker is focussed more on wrapping up an
application rather than providing a VPS / chroot on steroids. I'd love to
be able to run multiple services inside a docker container, which would
also require multiple virtual network interfaces per container.

Is it possible to use docker in this way?

Thanks


Reply to this email directly or view it on GitHubhttps://github.com/dotcloud/docker/issues/2170
.

Collaborator

shykes commented Oct 11, 2013

Hi Ben, you can use docker in what I call "machine mode" by simply
executing /sbin/init.

Something like "docker run -p 22 -d MYIMAGE /sbin/init" should start the
init process in the background and, provided it starts a ssh daemon, will
make sure it's available on a public port.

I hope this helps.

On Fri, Oct 11, 2013 at 12:05 AM, Ben Booth notifications@github.comwrote:

I've been using LXC container in the traditional sense for a while now. I
use them for self-contained, development environments.
I am currently able to have a puppet agent running inside each container
which allows them to be built up using manifests similar to my live
environment.
I really like docker and it would certainly each to admin side of spinning
up containers, but it seems that docker is focussed more on wrapping up an
application rather than providing a VPS / chroot on steroids. I'd love to
be able to run multiple services inside a docker container, which would
also require multiple virtual network interfaces per container.

Is it possible to use docker in this way?

Thanks


Reply to this email directly or view it on GitHubhttps://github.com/dotcloud/docker/issues/2170
.

@kiorky

This comment has been minimized.

Show comment
Hide comment
@kiorky

kiorky Oct 11, 2013

Contributor

It has unsolved bugs.
It need special love to make compatible images, but it can work.

You may have a look to https://github.com/makinacorpus/vms/tree/master/docker/ubuntu/ubuntu
And also at #1960 and #2068

Contributor

kiorky commented Oct 11, 2013

It has unsolved bugs.
It need special love to make compatible images, but it can work.

You may have a look to https://github.com/makinacorpus/vms/tree/master/docker/ubuntu/ubuntu
And also at #1960 and #2068

@kiorky

This comment has been minimized.

Show comment
Hide comment
@kiorky

kiorky Oct 11, 2013

Contributor

I would also love from this to be totally officially supported and evangelized as a way to use docker.

Contributor

kiorky commented Oct 11, 2013

I would also love from this to be totally officially supported and evangelized as a way to use docker.

@benbooth493

This comment has been minimized.

Show comment
Hide comment
@benbooth493

benbooth493 Oct 11, 2013

Thanks for the speedy replies! Great community!

benbooth493 commented Oct 11, 2013

Thanks for the speedy replies! Great community!

@jpetazzo

This comment has been minimized.

Show comment
Hide comment
@jpetazzo

jpetazzo Oct 11, 2013

Contributor

@benbooth493: as said by others, this is definitely possible; and even though it's not the primary goal of Docker, this is a feature that we want to continue to support :-)

@kiorky: thanks for linking those two issues; I was aware of the one about writable /etc files, but I had missed the one about shutdown/reboot issues. I'll add it to my "radar"! If there are other issues with "machine containers", don't hesitate to bring them up. This is very helpful for us!

Contributor

jpetazzo commented Oct 11, 2013

@benbooth493: as said by others, this is definitely possible; and even though it's not the primary goal of Docker, this is a feature that we want to continue to support :-)

@kiorky: thanks for linking those two issues; I was aware of the one about writable /etc files, but I had missed the one about shutdown/reboot issues. I'll add it to my "radar"! If there are other issues with "machine containers", don't hesitate to bring them up. This is very helpful for us!

@kiorky

This comment has been minimized.

Show comment
Hide comment
@kiorky

kiorky Oct 11, 2013

Contributor

/cc @regilero

Contributor

kiorky commented Oct 11, 2013

/cc @regilero

@kiorky

This comment has been minimized.

Show comment
Hide comment
@kiorky

kiorky Oct 17, 2013

Contributor

also #2276

Contributor

kiorky commented Oct 17, 2013

also #2276

@sneak

This comment has been minimized.

Show comment
Hide comment
@sneak

sneak Nov 11, 2013

Thirded!

My use case is to "RUN rm /etc/init/*" and then write my own upstart configs into there so I can use upstart instead of supervise as upstart already comes with Ubuntu. (Lots of packages already come with upstart configs, too.)

sneak commented Nov 11, 2013

Thirded!

My use case is to "RUN rm /etc/init/*" and then write my own upstart configs into there so I can use upstart instead of supervise as upstart already comes with Ubuntu. (Lots of packages already come with upstart configs, too.)

@bodenr

This comment has been minimized.

Show comment
Hide comment
@bodenr

bodenr Dec 8, 2013

+1 for "system container" support. this will likely be an impediment (mid-term) for wider spread adoption in our camp as well.

bodenr commented Dec 8, 2013

+1 for "system container" support. this will likely be an impediment (mid-term) for wider spread adoption in our camp as well.

@sickill

This comment has been minimized.

Show comment
Hide comment
@sickill

sickill commented Jan 28, 2014

👍

@kiorky

This comment has been minimized.

Show comment
Hide comment
@kiorky

kiorky Jan 28, 2014

Contributor

the bug to +1 is #2276.

Contributor

kiorky commented Jan 28, 2014

the bug to +1 is #2276.

@crosbymichael

This comment has been minimized.

Show comment
Hide comment
@crosbymichael

crosbymichael Mar 28, 2014

Contributor

We have an image called ubuntu-upstart that is configured to run init and works well.

Contributor

crosbymichael commented Mar 28, 2014

We have an image called ubuntu-upstart that is configured to run init and works well.

@kiorky

This comment has been minimized.

Show comment
Hide comment
@kiorky

kiorky Mar 28, 2014

Contributor

i really doubt this solves all whats linked in #2276, and how is built this image !?

Contributor

kiorky commented Mar 28, 2014

i really doubt this solves all whats linked in #2276, and how is built this image !?

@tianon

This comment has been minimized.

Show comment
Hide comment
@tianon

tianon Mar 28, 2014

Member

See stackbrew for how most of the official images are created.

Member

tianon commented Mar 28, 2014

See stackbrew for how most of the official images are created.

@kiorky

This comment has been minimized.

Show comment
Hide comment
@kiorky

kiorky Mar 29, 2014

Contributor

@tianon

Seems a lot of events are lacking for such an image to work well.
What i usually do is to include a bunch of upstart jobs and a shell script to be a good lxc citizen:

See

Contributor

kiorky commented Mar 29, 2014

@tianon

Seems a lot of events are lacking for such an image to work well.
What i usually do is to include a bunch of upstart jobs and a shell script to be a good lxc citizen:

See

@jpetazzo

This comment has been minimized.

Show comment
Hide comment
@jpetazzo

jpetazzo Apr 1, 2014

Contributor

Hi @benbooth493, hi @kiorky!

Do you think we could close that issue and refer back to #2276?
I believe that @tianon's work on stackbrew/ubuntu-upstart might help (and by combining with @kiorky's improvements I'm sure we can reduce the issues even further).

For the record, you can do this to test it:

CID=$(docker run -d stackbrew/ubuntu-upstart)
IPADDR=$(docker inspect --format='{{.NetworkSettings.IPAddress}}' $CID)
ssh root@$IPADDR

Password is docker.io.

Contributor

jpetazzo commented Apr 1, 2014

Hi @benbooth493, hi @kiorky!

Do you think we could close that issue and refer back to #2276?
I believe that @tianon's work on stackbrew/ubuntu-upstart might help (and by combining with @kiorky's improvements I'm sure we can reduce the issues even further).

For the record, you can do this to test it:

CID=$(docker run -d stackbrew/ubuntu-upstart)
IPADDR=$(docker inspect --format='{{.NetworkSettings.IPAddress}}' $CID)
ssh root@$IPADDR

Password is docker.io.

@cpuguy83

This comment has been minimized.

Show comment
Hide comment
@cpuguy83

cpuguy83 Aug 14, 2014

Contributor

I'm going to go ahead and close this
See as mentioned above #2276 for more info.

Also see phusion/baseimage-docker for another machine-mode image.

Contributor

cpuguy83 commented Aug 14, 2014

I'm going to go ahead and close this
See as mentioned above #2276 for more info.

Also see phusion/baseimage-docker for another machine-mode image.

@cpuguy83 cpuguy83 closed this Aug 14, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment