News for hackers. Stuff that matters.
Re:Your Docker image might be broken without you knowing it by philips on Tuesday February 18, 2014 @10:05AM (#7258429)
It depends on the init system, however.

systemd makes an effort to ensure that running /sbin/init inside of a container works and can be detected by the software and services underneath it[1]. In general this means that if you take a copy of Arch or Fedora and try to run it inside of a container it works properly without any hacks.

For your own services you can also start to do the right things by using the virtualization detection code[2] that is built in. The most immediately useful one being: ConditionVirtualization=container and !container. With these directives you can tell your services to run or not run depending on whether you are in a container or on real hardware.

[1]: http://www.freedesktop.org/wiki/Software/systemd/ContainerIn... [2] http://www.freedesktop.org/software/systemd/man/systemd.unit...

Re:Your Docker image might be broken without you knowing it by mst on Tuesday February 18, 2014 @11:20AM (#7258939)
ConditionVirtualization=container seems like a "with great power comes great ability to screw up in subtle and horrible ways" sort of feature, wherein when you need it, you really need it, but most of the time, a different approach will be vastly preferable.
Re:Your Docker image might be broken without you knowing it by philips on Tuesday February 18, 2014 @12:04PM (#7259283)
Absolutely. This was in the context of the parent talking about doing things without certain privileges or skipping unnecessary steps.
Re:Your Docker image might be broken without you knowing it by makomk on Tuesday February 18, 2014 @06:08PM (#7261374)
Same with Gentoo's homebrew init system OpenRC, which has had support for running in various kinds of containers for a while now.