In diesem Artikel beschreibe ich, wie man einen LXC-Container so aufsetzt, dass man damit Änderungen an unseren Webseiten vornehmen kann. Die Beschreibung verwendet Ubuntu-16.04.1 (Xenial) als Basis.
- LXC-Container initialisieren:
- Mit LXD:
lxc copy ubuntu1604-64 octopress - Ohne LXD:
sudo lxc-copy -n ubuntu1604-64 -N octopress
- Mit LXD:
- LXC-Container starten
- Mit LXD:
lxc start octopress - Ohne LXD:
sudo lxc-start -n octopress
- Mit LXD:
- Anmelden LXC-Container
- Mit LXD:
lxc exec octopress /bin/bash - Ohne LXD:
sudo lxc-attach octopress
- Mit LXD:
- IP-Adresse ermitteln und Octopress installieren
ifconfig eth0–>inet addr:10.1.3.249
- Anmelden mittels SSH:
ssh -A ubuntu@10.1.3.249 - Wechseln in’s Octopress-Verzeichnis:
cd git/dp-octopress - Generieren:
rake generate - Vorschau:
rake preview– http://10.1.3.249:4000 - Ausrollen nach daemons-point.com:
rake deploy - Schlußkontrolle: http://daemons-point.com
- LXC-Container stoppen
- Mit LXD:
lxc stop octopress - Ohne LXD:
sudo lxc-stop -n octopress
- Mit LXD: