User Tools

Site Tools


lxc_images

Creating Containers

The main overview for creating/downloading images NOT in the templates is:

lxc-create -n container_name -t container_template -- -r distro_release -a distro_architercture
An example CentOS6 is:
# lxc-create -n CentOS6 -t download -- -d centos -r 6 -a amd64
Example CentOS7:
# lxc-create -n CentOS7 -t download -- -d centos -r 7 -a amd64
Example Ubuntu 14.04LTS:
# lxc-create -n Ubuntu-14.04LTS -t ubuntu -- -r trusty -a amd64
Example Ubutu 16.04 LTS:
# lxc-create -n Ubuntu-16.04LTS -t ubuntu -- -r xenial -a amd64

NOTE

Most of these containers are completely blank/fresh images.
These images do not have basic commands like 'ls' and 'cat'. To export your local path, simply run the following command:

tee -a ~/.bashrc <<EOF
export PATH=$PATH:/sbin:/bin
EOF

source ~/.bashrc

lxc_images.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki