diff --git a/.github/workflows/lxc-build.yml b/.github/workflows/lxc-build.yml new file mode 100644 index 0000000..ce931f5 --- /dev/null +++ b/.github/workflows/lxc-build.yml @@ -0,0 +1,38 @@ +--- + +name: LXC Build + +on: + push: + workflow_dispatch: + +jobs: + packer: + runs-on: ubuntu-latest + name: packer + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + # validate templates + - name: Validate Container + run: packer validate piston.pkr.hcl + working-directory: container + + # build container + - name: Build Artifact + run: packer build -var 'make_threads=32' piston.pkr.hcl + working-directory: container + + - name: Rename config + run: mv lxc-config config + working-directory: container + + # Upload container + - uses: actions/upload-artifact@v2 + with: + name: lxc-container + path: | + container/output-piston-bionic/config + container/output-piston-bionic/rootfs.tar.gz \ No newline at end of file diff --git a/readme.md b/readme.md index 739bc4f..8be5356 100644 --- a/readme.md +++ b/readme.md @@ -141,15 +141,23 @@ cd piston/lxc #### Installation (simple) -- `cd container && ./install.sh` +- `mkdir -p /var/lib/lxc/piston` +- `cd /var/lib/lxc/piston` +- `wget [latest container url] -o container.zip` +- `unzip container.zip` +- `tar xzf rootfs.tar.gz` +- `rm rootfs.tar.gz container.zip` +- Good to go! + + +#### Installation (advanced) + +- `cd ../container && ./install.sh` - Wait, it may take up to an hour. - `cd ../lxc && ./start && cd ..` - Good to go! -#### Installation (advanced) - -- See `var/install.txt` for how to create a new LXC container and install all of the required -software. +Alternatively, see `var/install.txt` for how to build the container manually #### CLI Usage - `cli/execute [language] [file path] [args]`