Devboot update: 23-10-04-23-06-58

This commit is contained in:
Matheus Albino
2023-10-04 23:06:58 -03:00
parent cc4f9d7245
commit bb97b733fb
8 changed files with 90 additions and 49 deletions

View File

@@ -1,35 +0,0 @@
#!/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

View File

@@ -1,10 +1,12 @@
#!/bin/bash
# docker
DOCKER_DISTRO="Arch"
DOCKER_DIR=/mnt/wsl/shared-docker
DOCKER_SOCK="$DOCKER_DIR/docker.sock"
export DOCKER_HOST="unix://$DOCKER_SOCK"
if [ ! -S "$DOCKER_SOCK" ]; then
mkdir -pm o=,ug=rwx "$DOCKER_DIR"
chgrp docker "$DOCKER_DIR"
/mnt/c/Windows/System32/wsl.exe -d $DOCKER_DISTRO sh -c "nohup sudo -b dockerd < /dev/null > $DOCKER_DIR/dockerd.log 2>&1"
fi
# if [ ! -S "$DOCKER_SOCK" ]; then
# mkdir -pm o=,ug=rwx "$DOCKER_DIR"
# chgrp docker "$DOCKER_DIR"
# /mnt/c/Windows/System32/wsl.exe -d $DOCKER_DISTRO sh -c "nohup sudo -b dockerd < /dev/null > $DOCKER_DIR/dockerd.log 2>&1"
# fi