[Lxc-users] An application container for apache?

Daniel Lezcano daniel.lezcano at free.fr
Thu Jan 20 21:49:54 UTC 2011


On 01/20/2011 05:56 PM, Brian K. White wrote:
> On 1/20/2011 10:29 AM, Sergio Daniel Troiano wrote:
>> Andre,
>>
>> I'm using Slackware and i've compiled lxc-7.2 because when i tried to
>> use lxc-7.3 i couldnt mount anything within the container.
>>
>> You have to create a root enviroment , i use /container, here are all
>> shared files and directories (/usr, /bin, /etc and so on)
>> besides you must create no-shared directories (for example apache logs)
>> you'll mount them when you start the container.
>>
>> You can use DEBUG mode when you start the container "lxc-start -n web -d
>> -lDEBUG -o log_debug_file -f lxc.conf"
>> i use 2 config files , the first one is lxc.conf
>>
>> lxc.utsname = web
>> lxc.mount = config.fstab
>> lxc.rootfs = /container
>> lxc.tty = 12
>> lxc.pts = 1024
>> lxc.cgroup.cpuset.cpus = 0,1,2,3,4,5,6,7
>> lxc.network.type = veth
>> lxc.network.flags = up
>> lxc.network.link = br0
>> lxc.network.name = eth0
>> lxc.network.ipv4 = 192.168.1.241/24
>> lxc.cgroup.devices.allow = a
>>
>> The second one is config.fstab
>>
>>
>> ## Apache logs, fcgid
>> /home/skel.containers/web/usr/local/apache2/logs
>> /container/usr/local/apache2/logs bind defaults,bind 0 0
>> ## Apache conf
>> /home/skel.containers/web/usr/local/apache2/conf
>> /container/usr/local/apache2/conf bind defaults,bind 0 0
>> none /container/proc proc defaults 0 0
>> none /container/dev/pts devpts newinstance 0 0
>>
>>
>> */Sergio D. Troiano/*
>> /Development Team./
>>
>>
>> /Av. de los Incas 3085/
>> /(C1426ELA) Capital Federal/
>>
>>
>>
>> On Thu, 2011-01-20 at 13:51 -0200, Andre Nathan wrote:
>>> On Thu, 2011-01-20 at 11:44 -0200, Sergio Daniel Troiano wrote:
>>>>   Sure but there are a lot of things i have found about lxc , how far
>>>>   are you? where are you  stuck?
>>> I'm just beginning with LXC... I have tried to use the lxc-sshd script
>>> as a starting point but I still haven't got it to work yet.
>>>
>>> Do you have apache starting up as a normal user? Are you using read-only
>>> bind mounts? Which directories did you have to make user-specific, and
>>> which are shared by the host and the containers?
>>>
>>> Thanks a lot,
>>> Andre
> I've been unable to use 7.3 also, at least with my existing 7.2 configs.

There is a bug with the 0.7.3 version and the mount points.

This is fixed and will be in the 0.7.4 very soon.I assume it must 
"work", and only the developer who changed it knows how
> to make it work after that change.
>
> I'd like a description of that here or somewhere so I can stay up to
> date. I saw only an unclear answer to a similar question a while back.
> Something about the mount paths being relative to some other context
> than before, but it wasn't explained exactly what needs to be specified
> relative to what.
>
> I haven't tried to deduce it by trial&  error since I need all my
> working lxc hosts to actually work at the moment, so they have to keep
> running 7.2. I haven't had time to set up a new lxc host purely for
> testing that I can try 7.3 on without disturbing the production boxes.
>





More information about the lxc-users mailing list