mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-22 04:56:30 +02:00
apt with sudo
This commit is contained in:
parent
a331b62315
commit
c6fc9fe493
1 changed files with 10 additions and 5 deletions
15
.github/workflows/lxc-build.yml
vendored
15
.github/workflows/lxc-build.yml
vendored
|
@ -20,12 +20,17 @@ jobs:
|
|||
run: packer validate piston.pkr.hcl
|
||||
working-directory: container
|
||||
|
||||
- name: Install LXC
|
||||
- name: Install LXC and Packer
|
||||
run: |
|
||||
apt install -y lxc lxc-templates debootstrap libvirt0
|
||||
echo "lxc.net.0.type = veth" > /etc/lxc/default.conf
|
||||
echo "lxc.net.0.link = lxcbr0" >> /etc/lxc/default.conf
|
||||
echo "lxc.net.0.flags = up" >> /etc/lxc/default.conf
|
||||
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
|
||||
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
|
||||
sudo apt-get update -y
|
||||
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
|
||||
|
||||
# build container
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue