Difference between revisions of "LXD Cheat Sheet"
Jump to navigation
Jump to search
(Created page with "``` lxc launch ubuntu:18.04 example lxc launch images:centos/8 example8 sudo lxc config device add example tcp11000 proxy listen=tcp:0.0.0.0:11000 connect=tcp:127.0.0.1:80 sud...") |
|||
Line 21: | Line 21: | ||
We can add your host in as well just use the above example | We can add your host in as well just use the above example | ||
When you look at how this works I think you will see how easy it is to add this into a really tight ci/cd pipeline | When you look at how this works I think you will see how easy it is to add this into a really tight ci/cd pipeline | ||
+ | ``` | ||
+ | |||
+ | ``` | ||
+ | lxc config device add CONTAINER-NAME eth1 nic name=eth1 nictype=bridged parent=lxdbr0 | ||
``` | ``` |
Revision as of 14:20, 10 October 2020
lxc launch ubuntu:18.04 example lxc launch images:centos/8 example8 sudo lxc config device add example tcp11000 proxy listen=tcp:0.0.0.0:11000 connect=tcp:127.0.0.1:80 sudo ufw status sudo ufw allow 11000 lxc exec example /bin/bash apt install -y nginx exit http://example:11000/ # Teardown sudo ufw delete allow 11000 sudo lxc delete -f example8 sudo lxc config device remove example tcp11000 sudo lxc stop example sudo lxc delete example reverse proxy/keys are done via nginx reverse proxy lxc exec adc /bin/bash /etc/nginx/conf.d/example.conf We can add your host in as well just use the above example When you look at how this works I think you will see how easy it is to add this into a really tight ci/cd pipeline
lxc config device add CONTAINER-NAME eth1 nic name=eth1 nictype=bridged parent=lxdbr0