Create an lxc container
jlk@ubuntu:~$ sudo lxc-create -t download --name centos
Setting up the GPG keyring
Downloading the image index
---
DIST RELEASE ARCH VARIANT BUILD
---
alpine 3.3 amd64 default 20171004_17:50
alpine 3.3 armhf default 20170103_17:50
alpine 3.3 i386 default 20171004_17:50
alpine 3.4 amd64 default 20171004_17:50
alpine 3.4 armhf default 20170111_20:27
alpine 3.4 i386 default 20171004_17:50
alpine 3.5 amd64 default 20171004_17:50
alpine 3.5 i386 default 20171004_17:50
alpine 3.6 amd64 default 20171004_17:50
alpine 3.6 i386 default 20171004_17:50
alpine edge amd64 default 20171004_17:50
alpine edge armhf default 20170111_20:27
alpine edge i386 default 20171004_17:50
archlinux current amd64 default 20171005_01:27
archlinux current i386 default 20171005_01:27
centos 6 amd64 default 20171005_02:16
centos 6 i386 default 20171005_02:16
centos 7 amd64 default 20171005_02:16
debian buster amd64 default 20171005_04:27
. . .Â
ubuntu zesty s390x default 20171005_03:49
---
Distribution: centos
Release: 7
Architecture: amd64
Downloading the image index
Downloading the rootfs
Downloading the metadata
The image cache is now ready
Unpacking the rootfs
---
You just created a CentOS container (release=7, arch=amd64, variant=default)
To enable sshd, run: yum install openssh-server
For security reason, container images ship without user accounts
and without a root password.
Use lxc-attach or chroot directly into the rootfs to set a root password
or create user accounts.
jlk@ubuntu:~$
jlk@ubuntu:~$ sudo lxc-ls
centos facecontainer
jlk@ubuntu:~$ sudo lxc-info --name centos
Name: centos
State: STOPPED