This commit is contained in:
Sebastian Hanz 2025-02-17 17:56:00 +01:00
commit 6a8b9708fd
9 changed files with 320 additions and 0 deletions

View file

@ -0,0 +1,20 @@
#!/bin/bash
container_name=$1
output_dir=$2
if [ -z "$1" ]; then
echo -e "\nParameter fehlen!\n"
echo -e "Usage: createDockerComposeFile.sh <containername> \n"
echo -e "Beispiel: ./createDockerComposeFile.sh iobroker \n"
exit
fi
if [ -z "$2" ]; then
output_dir=$(pwd)/docker-compose.yml
fi
# Erstelle Docker-Compose-File
echo -e "\nErstelle Docker-Compose-File in aktuellem Verzeichnis\n"
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/red5d/docker-autocompose $container_name > $output_dir
echo -e "Fertig!\n"
exit 0