Skip to content

Instantly share code, notes, and snippets.

Last active April 20, 2022 20:30
Show Gist options
  • Save Rajeshr34/37b711fc8bbf102ef47557d55a5c8c28 to your computer and use it in GitHub Desktop.
Save Rajeshr34/37b711fc8bbf102ef47557d55a5c8c28 to your computer and use it in GitHub Desktop.
WSL Install Docker+GIT+OPENSSH+CURL in Alpine 3.11.3
!NOTE: host system (windows) should not install any kind of nodejs or python or any other development softwares except IDEs and DOCKER
Enable WSL
Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Update windows to insider program
wsl --set-default-version 2
Install Docker in WINDOWS Stable
ENABLE expose daemon on tcp://localhost:2375 without tls
Install Alpine #
Install Windows Terminal #
Open Terminal
logging in with root (wsl.exe --distribution Alpine --user root),
setting a root password (passwd),
installing sudo (apk add sudo nano),
un-commenting a line in the /etc/sudoers file to allow anyone use sudo who is in the sudo group (%sudo ALL=(ALL) ALL),
create a sudo group (addgroup sudo) and
add my default user to that group (usermod -aG sudo <username>).
After that set the password for the default user (passwd <username>), close and reopen the Alpine console.
Alpine config --default-user root
echo '[automount]
options = "metadata"' > /etc/wsl.conf
apk update
apk add zsh curl git
sh -c "$(curl -fsSL"
apk add -U openrc libstdc++ bash ca-certificates openssl ncurses coreutils python2 make gcc g++ libgcc linux-headers grep util-linux binutils findutils git openssh docker py-pip python-dev libffi-dev openssl-dev gcc libc-dev make
rc-update add docker boot
service docker start
pip install docker-compose
echo "export DOCKER_HOST=tcp://localhost:2375" >> ~/.profile
Not Working
#curl -o- | bash;
#echo 'source $HOME/.profile;' >> $HOME/.zshrc;
#echo 'export NVM_NODEJS_ORG_MIRROR=;'
#echo 'nvm_get_arch() { nvm_echo "x64-musl"; }' >> $HOME/.profile;
#NVM_DIR="$HOME/.nvm"; source $HOME/.nvm/; source $HOME/.profile;
#nvm install 12
Change Default Profile to Alpine in Windows Terminal
Windows Terminal > Dropdown > Settings Edit JSON# profiles.default
EDIT: C:\Users\<USER>\.WebStorm2019.3\config\options\wsl.distributions.xml
ADD ABOVE </set> (end of set decorator)
Change Shell path to "wsl.exe"
To Debug Node Projects ("--inspect-brk")
Run/Debug Configurations > Add (Plus +) > npm > command "run" > scripts > <CHOOSE> > Node Options: "--inspect" > Ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment