Initial commit
This commit is contained in:
parent
ab2e2b0fab
commit
8d561817d5
@ -131,6 +131,7 @@ ROOTFS=${STORAGE}:${DISK_REF-}${DISK}
|
|||||||
# Create LXC
|
# Create LXC
|
||||||
msg "Creating LXC container..."
|
msg "Creating LXC container..."
|
||||||
DISK_SIZE=8G
|
DISK_SIZE=8G
|
||||||
|
MEMORY_RAM=4098
|
||||||
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
|
||||||
warn "Some containers may not work properly due to ZFS not supporting 'fallocate'."
|
warn "Some containers may not work properly due to ZFS not supporting 'fallocate'."
|
||||||
@ -142,7 +143,7 @@ HOSTNAME=Gitlab
|
|||||||
TEMPLATE_STRING="local:vztmpl/${TEMPLATE}"
|
TEMPLATE_STRING="local:vztmpl/${TEMPLATE}"
|
||||||
pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \
|
pct create $CTID $TEMPLATE_STRING -arch $ARCH -features nesting=1 \
|
||||||
-hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 \
|
-hostname $HOSTNAME -net0 name=eth0,bridge=vmbr0,ip=dhcp -onboot 1 \
|
||||||
-ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE >/dev/null
|
-ostype $OSTYPE -rootfs $ROOTFS,size=$DISK_SIZE -storage $STORAGE, -memory $MEMORY_RAM >/dev/null
|
||||||
|
|
||||||
# Modify LXC permissions to support Docker
|
# Modify LXC permissions to support Docker
|
||||||
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
|
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user