OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

5.7. Container configuration


Containers are configured according to a set of profiles, described in the next section, and a set of container- specific configuration. Profiles are applied first, so that container specific configuration can override profile configuration.


Container configuration includes properties like the architecture, limits on resources such as CPU and RAM, security details including apparmor restriction overrides, and devices to apply to the container.


Devices can be of several types, including UNIX character, UNIX block, network interface, or 'disk'. In order to insert a host mount into a container, a 'disk' device type would be used. For instance, to mount /opt in container c1 at /opt, you could use:


lxc config device add c1 opt disk source=/opt path=opt


See:


lxc help config


for more information about editing container configurations. You may also use:


lxc config edit c1


to edit the whole of c1's configuration in your specified $EDITOR. Comments at the top of the configuration will show examples of correct syntax to help administrators hit the ground running. If the edited configuration is not valid when the $EDITOR is exited, then $EDITOR will be restarted.


Top OS Cloud Computing at OnWorks: