#!/bin/sh if [ "$2" = "post-start" ]; then lxc-attach "$1" < /dev/null if [ \$? -eq 0 ]; then echo 'http://dl-cdn.alpinelinux.org/alpine/v3.20/main' > /etc/apk/repositories echo 'http://dl-cdn.alpinelinux.org/alpine/v3.20/community' >> /etc/apk/repositories echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories fi export PATH=/sbin:\$PATH apk update apk upgrade openrc -s sshd status 2>&1 | grep 'does not exist' &> /dev/null if [ \$? -eq 0 ]; then apk add openssh-server python3 containerd tzdata cri-o crun rc-update add sshd rc-update add crio echo 'Welcome to Alpine!' > /etc/motd openrc -s sshd start fi EOF fi