ganto / lxc3

Description

RPM packages for the LXC/LXD 3.0 release. This might become deprecated once lxc-3.x has been added to Fedora upstream.

Spec file sources

github.com: ganto/copr-lxc3

Installation Instructions

Steps to run LXC 3.0:

  • Enable this COPR repository:

    # dnf copr enable ganto/lxc3
  • Install LXC:

    # dnf install lxc
  • If you already have LXC installed from the Fedora repository run:

    # dnf update lxc lxc-templates

IMPORTANT

This will replace your lxc packages in case you had previously installed them from the official Fedora repositories. However, the release numbers of the COPR packages are chosen in way, that the official lxc packages should again replace the COPR packages once provided by Fedora.

  • Install LXD:

    # dnf install lxd lxd-client lxd-tools

Getting Started - LXC

If you already have a network bridge (e.g. through libvirt) that you want to use with your containers, define it in /etc/lxc/default.cfg:

lxc.net.0.link = virbr0

If you want LXC to handle the bridge for the containers follow the instructions from the Fedora wiki.

Start the LXC service which will setup the bridge and dnsmasq (if enabled) and later start the containers on host restart:

# systemctl enable --now lxc.service

Create container from a download image:

# lxc-create -n mycontainer -t download -- --dist fedora --release 27 --arch amd64 # lxc-start -n mycontainer # lxc-attach -n mycontainer

Create container from an OCI image (requires COPR: ganto/umoci) :

# dnf install skopeo umoci jq # lxc-create myalpine -t oci -- --url docker://alpine

Getting Started - LXD

Add management user account to lxd group:

# usermod -a -G lxd <user>

Set sub{u,g}id range for containerized root user. For more information see man (5) subuid.

# echo "root:1000000:65536" >> /etc/subuid # echo "root:1000000:65536" >> /etc/subgid

Enable and start lxd:

# systemctl enable lxd && systemctl start lxd

To properly work with SELinux the default unix socket for LXD is redefined via LXD_SOCKET environment variable. It is automatically set when logging in, therefore you have to re-login or sourcing the profile before you can access lxd:

# source /etc/profile # lxd init

List available default images:

$ lxc image list images:

Start your first container:

$ lxc launch images:fedora/27

Active Releases

The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).

Release Architectures Repo Download
Epel for CentOS 7 x86_64 [modified] (38)* Epel for CentOS 7 (210 downloads)
Fedora 27 x86_64 (141)* Fedora 27 (269 downloads)
Fedora 28 x86_64 (345)* Fedora 28 (179 downloads)
Fedora 29 x86_64 (4)* Fedora 29 (18 downloads)
Fedora rawhide x86_64 (0)* Fedora rawhide (25 downloads)

* Total number of packages downloaded in the last seven days.