haghighi/lxc3

( forked from ganto/lxc3 )

Project ID: 34989

Description

RPM packages for the LXC/LXD 3.1 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.1:

  • 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

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

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/29

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 7 x86_64 [modified] (213)* EPEL 7 (64 downloads)
EPEL 8 x86_64 (270)* EPEL 8 (87 downloads)
Fedora 38 x86_64 (0)* Fedora 38 (0 downloads)
Fedora 39 x86_64 (0)* Fedora 39 (16 downloads)
Fedora 40 x86_64 (0)* Fedora 40 (13 downloads)
Fedora 41 x86_64 (0)* Fedora 41 (4 downloads)
Fedora rawhide x86_64 (250)* Fedora rawhide (58 downloads)

* Total number of downloaded packages.