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

View File

@@ -0,0 +1,10 @@
# 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