new file docs/gentoo_lxd_container.md

This commit is contained in:
2017-07-29 10:20:59 -07:00
parent 14649a2871
commit 5eb70659ef
21 changed files with 453 additions and 21 deletions

View File

@ -0,0 +1,59 @@
# Gentoo LXD Container
## There are Gentoo images at [linuxcontainers.org](https://us.images.linuxcontainers.org/)
```bash
lxc image list images: | grep gentoo
lxc init images:34760012759f
# or
lxc init images:34760012759f <pick a name>
```
## Networking
The default image will request dhcp service on eth0. If you need a second static
connection on eth1, do the following. Describe eth1 in `/etc/conf.d/net`
```conf
# /etc/conf.d/net
config_eth1="10.44.84.101 netmask 255.255.255.0 brd 10.44.84.255"
routes_eth1="default via 10.44.84.1"
```
Then in `/etc/init.d/`
```bash
ln -s /etc/init.d/net.lo /etc/init.d/net.eth1
```
Enable net.eth1 in init.
```bash
rc-update add net.eth1 default
```
And then start networking on eth1
```bash
/etc/init.d/net.eth1 start
```
## Locale and Timezone
You're supposed to write your timezone in `/etc/timezone`, `echo "Europe/Brussels" > /etc/timezone`,
and then run the command `emerge --config sys-libs/timezone-data`. But this doesn't work.
You can set the locale by uncommenting your locale in `/etc/locale-gen`, and then
running the following commands.
```bash
locale-gen
eselect locale list
eselect locale set <number>
. /etc/profile
```
And the following corrected the timezone.
```bash
unlink /etc/localtime
ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
```

View File

@ -7,6 +7,7 @@ Obviously, the commit history will reflect the time when these documents are wri
* [How To Reassign A Static Ip Address with dnsmasq](how_to_reassign_a_static_ip_address_with_dnsmasq.md)
* [Serve And Share Apps From Your Phone With Fdroid](serve_and_share_apps_from_your_phone_with_fdroid.md)
* [Nspawn Containers](nspawn.md)
* [Gentoo LXD Container](gentoo_lxd_container.md)
* [Mastodon on Arch](mastodon_on_arch.md)
* [Debian Nspawn Container On Arch For Testing Apache Configurations](debian_nspawn_container_on_arch_for_testing_apache_configurations.md)
* [Dynamic Cacheing Nginx Reverse Proxy For Pacman](dynamic_cacheing_nginx_reverse_proxy_for_pacman.md)