Difference between revisions of "Containers"
From Anarchaserver
(Created page with "We install containers to manage the transitional, finally LXE: https://wiki.debian.org/LXC <code> apt-get update </code> <code> apt-get install lxc </code> Create Let's cr...") |
|||
Line 2: | Line 2: | ||
LXE: https://wiki.debian.org/LXC | LXE: https://wiki.debian.org/LXC | ||
== STEP 0 Install lxc == | |||
<code> apt-get update </code> | <code> apt-get update </code> | ||
<code> apt-get install lxc </code> | <code> apt-get install lxc </code> | ||
Create Let's create a 'Transitional' virtual machine, a container | == STEP 1 Create Let's create a 'Transitional' virtual machine, a container == | ||
<code>lxc-create -n transitional -t debian</code> | <code>lxc-create -n transitional -t debian</code> | ||
How can a container access the network? | == STEP 2 How can a container access the network? == | ||
A container, has MAC adress, we need a bridge for networking, via dhcp, | A container, has MAC adress, we need a bridge for networking, via dhcp, | ||
So the container get an ip, and give access to the server's internal network | So the container get an ip, and give access to the server's internal network | ||
Do we opt for static of dynamic ip's? the dhcp server can have static ip via host/ it is anyhow setup to give a unique ip | Do we opt for static of dynamic ip's? the dhcp server can have static ip via host/ it is anyhow setup to give a unique ip to the MAC address of the container (guest). So the choice is obsolete. | ||
How can we access via the internet a container? | == STEP 3 How can we access via the internet a container? == | ||
Setup routing / (reverse) proxy system for networking, so depending on the different services (Living data, Nekrocemetery, Transitional) we create subdomains which direct you to the correct container. | Setup routing / (reverse) proxy system for networking, so depending on the different services (Living data, Nekrocemetery, Transitional) we create subdomains which direct you to the correct container. |
Revision as of 18:22, 24 May 2017
We install containers to manage the transitional, finally LXE: https://wiki.debian.org/LXC
STEP 0 Install lxc
apt-get update
apt-get install lxc
STEP 1 Create Let's create a 'Transitional' virtual machine, a container
lxc-create -n transitional -t debian
STEP 2 How can a container access the network?
A container, has MAC adress, we need a bridge for networking, via dhcp, So the container get an ip, and give access to the server's internal network
Do we opt for static of dynamic ip's? the dhcp server can have static ip via host/ it is anyhow setup to give a unique ip to the MAC address of the container (guest). So the choice is obsolete.
STEP 3 How can we access via the internet a container?
Setup routing / (reverse) proxy system for networking, so depending on the different services (Living data, Nekrocemetery, Transitional) we create subdomains which direct you to the correct container.