mirror of
https://gitlab.com/Snogard/kaido.git
synced 2025-08-20 10:50:06 +02:00
added template for install script
This commit is contained in:
parent
8cd9db2b40
commit
04ae2b1991
32
src/templates/install-container.sh
Normal file
32
src/templates/install-container.sh
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
source /opt/kaido/src/libs/bash/lib.sh
|
||||||
|
|
||||||
|
# setup
|
||||||
|
imageName=docker.io/
|
||||||
|
containerName=
|
||||||
|
|
||||||
|
dstBasePath="$KAIDO_CONTAINER_FOLDER/$containerName"
|
||||||
|
|
||||||
|
# envs
|
||||||
|
|
||||||
|
if [ -f "$KAIDO_CONFIG_FOLDER/containers/$containerName/envs.sh" ]; then
|
||||||
|
source "$KAIDO_CONFIG_FOLDER/containers/$containerName/envs.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# pre install
|
||||||
|
create_folder "$dstBasePath"
|
||||||
|
stop_and_remove_container $containerName
|
||||||
|
|
||||||
|
|
||||||
|
# install
|
||||||
|
echo "Creating new container"
|
||||||
|
podman create \
|
||||||
|
--name $containerName \
|
||||||
|
-v $dstBasePath:/path/to/folder \
|
||||||
|
$imageName
|
||||||
|
|
||||||
|
|
||||||
|
# systemd
|
||||||
|
create_systemd_services $containerName
|
||||||
|
systemctl --user enable --now $containerName
|
Loading…
x
Reference in New Issue
Block a user