I want to work on openshift projects from wsl. I have set up Minishift and VirtualBox on Windows, and have, as far as I can tell, aliased everything appropriately like so.
alias minishift='/mnt/c/Users/<username>/minishift-#####/minishift.exe'
#Sets oc binary alias
alias oc="$(wslpath -a $(minishift oc-env | grep -oP "(?<=PATH=)[^;]+"))/oc.exe"
#Sets docker environment variables
for i in $(minishift docker-env | awk '/SET/{print $2}');do if $( echo ${i} | grep -q 'DOCKER_CERT_PATH' );then eval DOCKER_CERT_PATH=$(wslpath -a $(echo ${i} | grep -oP "C:.*$"));else eval ${i};fi;done
However, I can't reach the local docker registry from wsl.
$ oc whoami -t | docker login -u developer --password-stdin $(minishift openshift registry)
INFO[0015] Error logging in to v2 endpoint, trying next endpoint: Get https://172.30.1.1:5000/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
INFO[0036] Error logging in to v1 endpoint, trying next endpoint: Get https://172.30.1.1:5000/v1/users/: dial tcp 172.30.1.1:5000: connect: connection refused
Get https://172.30.1.1:5000/v1/users/: dial tcp 172.30.1.1:5000: connect: connection refused
I'm not an expert on Docker, but what was confusing to me is that this IP was different than the DOCKER_HOST. It works fine from Windows.
C:\Users\${username}>oc whoami -t | docker login -u developer --password-stdin 172.30.1.1:5000
Login Succeeded
Perhaps the docker registry is set up on the Host Only Adapter on virtualbox and maybe wsl can't communicate with it for that reason?
Any insight or advice on my intended setup is greatly welcome.