Manage LXC Containers with Portage

NOTE: This is a work in progress and is not officially supported or sanctioned by Gentoo Linux or the Portage developers.

To add the custom overlay,

    $ git clone ~/.dotfiles

    $ cat << EOF > /etc/portage/repos.conf/dotfiles.conf
    > [dotfiles]
    > location = /usr/local/portage/dotfiles
    > sync-type = rsync
    > sync-uri = file:///home/lramage/.dotfiles/.local/usr/local/portage/dotfiles
    > priority = 9999
    > EOF

Then run emerge --sync dotfiles to sync the overlay.

To create the container,

    # First it needs to be unmasked.
    $ echo "lxc-container/paho-mqtt ~amd64" > /etc/portage/package.keywords/paho-mqtt
    $ emerge lxc-container/paho-mqtt


This post is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License