Add my-scripts and docker folders

This commit is contained in:
Matheus Albino Brunhara
2023-09-24 17:44:23 -03:00
parent 3ca9981c5b
commit 0bc235b1ed
9 changed files with 354 additions and 0 deletions

35
my-scripts/shell/dockerStart.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
# Function to display usage information
# show_help() {
# echo "Usage: $0 [options]"
# echo "Options:"
# echo " --compose Start compose containers"
# echo " --help Display this help message"
# exit 1
# }
# docker without docker desktop yippie!!!
# source: https://gbbigardi.medium.com/wsl-2-arch-docker-e-um-pouco-mais-do-meu-ambiente-de-desenvolvimento-42adc48368d4
if [ ! -S "$DOCKER_SOCK" ]; then
mkdir -pm o=,ug=rwx "$DOCKER_DIR"
chgrp docker "$DOCKER_DIR"
sudo /mnt/c/Windows/System32/wsl.exe -d $DOCKER_DISTRO sh -c "nohup sudo -b dockerd < /dev/null > $DOCKER_DIR/dockerd.log 2>&1"
fi
# Check for options
# case "$1" in
# --compose)
# sleep 2
# cd ~/documents/repos/zaks-clouds-manager/
# docker compose up -d
# ;;
# --help)
# show_help
# ;;
# *)
# echo "Unknown option: $1"
# show_help
# ;;
# esac