misc_lxc-template-generator/configs/games_wing.yaml

122 lines
No EOL
2.8 KiB
YAML

image:
name: debian-disco-x86_64
distribution: debian
release: bookworm
description: |-
Debian {{ image.release }}
architecture: amd64
source:
downloader: rootfs-http
url: file://SKYNET_ROOT_DIR/images/base/rootfs.tar.xz
targets:
lxc:
create_message: |-
You just created an {{ image.description }} container.
To enable SSH, run: apt install openssh-server
No default root or user password are set by LXC.
config:
- type: all
before: 5
content: |-
lxc.include = LXC_TEMPLATE_CONFIG/debian.common.conf
- type: user
before: 5
content: |-
lxc.include = LXC_TEMPLATE_CONFIG/debian.userns.conf
- type: all
after: 4
content: |-
lxc.include = LXC_TEMPLATE_CONFIG/common.conf
- type: user
after: 4
content: |-
lxc.include = LXC_TEMPLATE_CONFIG/userns.conf
- type: all
content: |-
lxc.arch = {{ image.architecture_personality }}
files:
- path: /skynet/wings.service
generator: copy
source: ./files/wings.service
packages:
manager: apt
update: true
cleanup: true
repositories:
- name: docker.list
url: |-
deb [arch={{ image.architecture }} signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian {{ image.release }} stable
sets:
- packages:
- docker.io
- docker-doc
- docker-compose
- podman-docker
- containerd
- runc
action: remove
- packages:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-buildx-plugin
- docker-compose-plugin
- fuse-overlayfs
action: install
actions:
# this runs before packages are installed.
- trigger: post-unpack
action: |-
#!/bin/sh
set -eux
# for dns
cp /etc/resolv.conf /etc/resolv.conf.bak
echo -e "\nnameserver 9.9.9.9" >> /etc/resolv.conf
# get and set teh key for docker
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
chmod a+r /etc/apt/keyrings/docker.gpg
# reset dns
cp /etc/resolv.conf.bak /etc/resolv.conf
- trigger: post-files
action: |-
#!/bin/sh
set -eux
# for dns
cp /etc/resolv.conf /etc/resolv.conf.bak
echo -e "\nnameserver 9.9.9.9" >> /etc/resolv.conf
# enable fuse
ln -s /usr/bin/fuse-overlayfs /usr/local/bin/fuse-overlayfs
# install the wings
mkdir -p /etc/pterodactyl
curl -L -o /usr/local/bin/wings "https://github.com/pterodactyl/wings/releases/latest/download/wings_linux_amd64"
chmod u+x /usr/local/bin/wings
# setup config file
cp /skynet/wings.service /etc/systemd/system
# make sure they run on boot
systemctl enable docker
systemctl enable wings
# reset dns
cp /etc/resolv.conf.bak /etc/resolv.conf