Install most basic Debian Jessie container for use as a template for LXC or similar

To create a most basic Debian Jessie container, you can follow these steps:

You should not forget to set the root password as it is good to have a known value later.

Now that we are within the container, we can configure the most basic settings that we will need for all containers:

Here I am usually generating

and set the default to en_US.UTF-8 .

To get the full repository contents, you should change your repository sources to look as below:

and then do an aptitude update .

You should also install an SSH server by entering

Enable root logins via SSH by changing one line in its configuration:

Unfortunately systemd is not yet working easily with LXC, so it should be replaced by the old sysvinit:

Edit initial DNS resolver configuration so it looks like this:

Then also configure the main network interface configuration:

Replace /etc/inittab with the following short version which is enough for a container:

Should the network not come up automatically, you can set the IP address in the config file of the container:

After a first start, you should also configure the mail server so it can send all system mail to your main mail server:

and answer all the questions.

Shut the machine down again, cleanup all the log files and make a copy which you can then use as your template for further containers.