initial commit
This commit is contained in:
parent
c04963b15e
commit
601b23cda3
@ -103,9 +103,7 @@ CTID=$(pvesh get /cluster/nextid)
|
|||||||
info "Container ID is $CTID."
|
info "Container ID is $CTID."
|
||||||
|
|
||||||
# Download latest Debian 10 LXC template
|
# Download latest Debian 10 LXC template
|
||||||
#msg "Updating LXC template list..."
|
|
||||||
pveam update >/dev/null
|
pveam update >/dev/null
|
||||||
#msg "Downloading LXC template..."
|
|
||||||
OSTYPE=debian
|
OSTYPE=debian
|
||||||
OSVERSION=${OSTYPE}-11
|
OSVERSION=${OSTYPE}-11
|
||||||
mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V)
|
mapfile -t TEMPLATES < <(pveam available -section system | sed -n "s/.*\($OSVERSION.*\)/\1/p" | sort -t - -k 2 -V)
|
||||||
@ -129,7 +127,6 @@ DISK=${DISK_PREFIX:-vm}-${CTID}-disk-0${DISK_EXT-}
|
|||||||
ROOTFS=${STORAGE}:${DISK_REF-}${DISK}
|
ROOTFS=${STORAGE}:${DISK_REF-}${DISK}
|
||||||
|
|
||||||
# Create LXC
|
# Create LXC
|
||||||
#msg "Creating LXC container..."
|
|
||||||
DISK_SIZE=4G
|
DISK_SIZE=4G
|
||||||
pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null
|
pvesm alloc $STORAGE $CTID $DISK $DISK_SIZE --format ${DISK_FORMAT:-raw} >/dev/null
|
||||||
if [ "$STORAGE_TYPE" == "zfspool" ]; then
|
if [ "$STORAGE_TYPE" == "zfspool" ]; then
|
||||||
@ -160,7 +157,6 @@ ln -fs $(readlink /etc/localtime) ${MOUNT}/etc/localtime
|
|||||||
pct unmount $CTID && unset MOUNT
|
pct unmount $CTID && unset MOUNT
|
||||||
|
|
||||||
# Setup container
|
# Setup container
|
||||||
#msg "Starting LXC container..."
|
|
||||||
pct start $CTID
|
pct start $CTID
|
||||||
pct push $CTID setup.sh /setup.sh -perms 755
|
pct push $CTID setup.sh /setup.sh -perms 755
|
||||||
pct push $CTID portainer_stack.yml /docker-compose.yml -perms 755
|
pct push $CTID portainer_stack.yml /docker-compose.yml -perms 755
|
||||||
@ -175,6 +171,6 @@ Enjoy!
|
|||||||
Portainer: http://${IP}:9000
|
Portainer: http://${IP}:9000
|
||||||
VSCode: http://${IP}:8433
|
VSCode: http://${IP}:8433
|
||||||
|
|
||||||
Setup root password with cmd: "passwd"
|
Create root password with cmd: "passwd"
|
||||||
And create a new user with: "adduser {USERNAME}"
|
And create a new user with: "adduser {USERNAME}"
|
||||||
"
|
"
|
Loading…
x
Reference in New Issue
Block a user