Add my-scripts and docker folders
This commit is contained in:
10
my-scripts/shell/runDockerWsl.sh
Executable file
10
my-scripts/shell/runDockerWsl.sh
Executable 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
|
||||
Reference in New Issue
Block a user