Ubuntu 16.10: コンテナ技術のLXDをインストールする

Table of Contents

1 LXDをインストールする


#!/bin/shset -esudo apt install -y lxd lxd-client lxd-tools zfsutils-linux criu# Initialize LXD with NAT network.sudo lxd waitreadycat <<EOF | sudo lxd inityesdefaultdirnoyesyeslxdbr0autoautoEOF# Add user to lxd group.sudo gpasswd -a “${USER}” lxd# Reboot for updating group.sudo reboot

2 コンテナを立ち上げる


$ lxc launch images:debian/stretch debian<snip>$ lxc exec debian ip a s1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWNgroup default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever5:eth0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueuestate UP group default qlen 1000 link/ether 00:16:3e:3c:1d:23 brd ff:ff:ff:ff:ff:ff link-netnsid 0 inet brd scope global eth0 valid_lft forever preferred_lft forever inet6 fd42:6bb1:545e:554b:216:3eff:fe3c:1d23/64 scope globalmngtmpaddr dynamic valid_lft 3596sec preferred_lft 3596sec inet6 fe80::216:3eff:fe3c:1d23/64 scope link valid_lft forever preferred_lft forever

Android | Linux | SDL - Narrow Escape