--- a/.bashrc Wed Sep 09 00:30:54 2020 +0300
+++ b/.bashrc Tue Oct 06 19:44:05 2020 +0300
@@ -288,3 +288,23 @@
git tag --contains "$1" --format '%(objectname)';
);
}
+
+mywsl-docker-enable() {
+ if [[ -z "$1" ]]; then
+ set default
+ fi
+ while IFS= read -r line; do
+ if [[ ! "$line" =~ ^export ]]; then
+ continue
+ fi
+ if [[ "$line" =~ DOCKER_CERT_PATH ]]; then
+ local p="${line#*=}" # Strip leading 'export var='.
+ p="${p#\"}" # Strip leading ".
+ p="${p%\"}" # Strip final ".
+ export DOCKER_CERT_PATH=$(wslpath -u $p)
+ export DOCKER_1=123
+ else
+ eval "$line"
+ fi
+ done < <(docker-machine.exe env --shell bash "$1")
+}