apt with sudo
This commit is contained in:
parent
a331b62315
commit
c6fc9fe493
|
@ -20,12 +20,17 @@ jobs:
|
||||||
run: packer validate piston.pkr.hcl
|
run: packer validate piston.pkr.hcl
|
||||||
working-directory: container
|
working-directory: container
|
||||||
|
|
||||||
- name: Install LXC
|
- name: Install LXC and Packer
|
||||||
run: |
|
run: |
|
||||||
apt install -y lxc lxc-templates debootstrap libvirt0
|
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
|
||||||
echo "lxc.net.0.type = veth" > /etc/lxc/default.conf
|
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
|
||||||
echo "lxc.net.0.link = lxcbr0" >> /etc/lxc/default.conf
|
sudo apt-get update -y
|
||||||
echo "lxc.net.0.flags = up" >> /etc/lxc/default.conf
|
sudo apt install -y lxc lxc-templates debootstrap libvirt0 packer
|
||||||
|
echo "lxc.net.0.type = veth" > default.conf
|
||||||
|
echo "lxc.net.0.link = lxcbr0" >> default.conf
|
||||||
|
echo "lxc.net.0.flags = up" >> default.conf
|
||||||
|
sudo rm /etc/lxc/default.conf
|
||||||
|
sudo cp default.conf /etc/lxc
|
||||||
systemctl start lxc-net
|
systemctl start lxc-net
|
||||||
|
|
||||||
# build container
|
# build container
|
||||||
|
|
Loading…
Reference in New Issue