22 lines
938 B
Bash
22 lines
938 B
Bash
#!/bin/bash
|
|
|
|
LXC_CONTAINER_NAME=$1
|
|
LXC_PROFILE=$2
|
|
|
|
echo "container name: $LXC_CONTAINER_NAME"
|
|
echo "profile: $LXC_PROFILE"
|
|
|
|
echo "starting container"
|
|
lxc launch ubuntu $LXC_CONTAINER_NAME -p $LXC_PROFILE
|
|
|
|
echo "setting lxc docker requirements"
|
|
curl -s "https://git.limbosolutions.com/kb/lxc/raw/branch/main/scripts/lxc-config-docker-requirements.sh" | bash -s $LXC_CONTAINER_NAME
|
|
lxc restart $LXC_CONTAINER_NAME
|
|
echo "updating apt"
|
|
lxc exec $LXC_CONTAINER_NAME -- sh -c "apt-get update -qq >/dev/null"
|
|
echo "upgrading apt"
|
|
lxc exec $LXC_CONTAINER_NAME -- sh -c "apt-get upgrade -qq >/dev/null"
|
|
echo "installing fuse & docker"
|
|
lxc exec $LXC_CONTAINER_NAME -- bash -c "curl -s \"https://git.limbosolutions.com/kb/docker/raw/branch/main/scripts/ubuntu-fuse-setup.sh\" | bash"
|
|
echo "installing portainer"
|
|
lxc exec $LXC_CONTAINER_NAME -- bash -c "curl -s \"https://git.limbosolutions.com/kb/portainer/raw/branch/main/scripts/setup.sh\" | bash" |