Last active
April 20, 2022 20:30
-
-
Save Rajeshr34/37b711fc8bbf102ef47557d55a5c8c28 to your computer and use it in GitHub Desktop.
WSL Install Docker+GIT+OPENSSH+CURL in Alpine 3.11.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!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 | |
https://hub.docker.com/editions/community/docker-ce-desktop-windows/ | |
ENABLE expose daemon on tcp://localhost:2375 without tls | |
Install Alpine #https://www.microsoft.com/en-in/p/alpine-wsl/9p804crf0395?activetab=pivot:overviewtab | |
Install Windows Terminal #https://www.microsoft.com/en-us/p/windows-terminal-preview/9n0dx20hk701 | |
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 https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
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- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash; | |
#echo 'source $HOME/.profile;' >> $HOME/.zshrc; | |
#echo 'export NVM_NODEJS_ORG_MIRROR=https://unofficial-builds.nodejs.org/download/release;' | |
#echo 'nvm_get_arch() { nvm_echo "x64-musl"; }' >> $HOME/.profile; | |
#NVM_DIR="$HOME/.nvm"; source $HOME/.nvm/nvm.sh; source $HOME/.profile; | |
#nvm install 12 | |
Change Default Profile to Alpine in Windows Terminal | |
Windows Terminal > Dropdown > Settings Edit JSON# profiles.default | |
WEBSTORM: | |
EDIT: C:\Users\<USER>\.WebStorm2019.3\config\options\wsl.distributions.xml | |
ADD ABOVE </set> (end of set decorator) | |
<descriptor> | |
<id>Alpine</id> | |
<microsoft-id>Alpine</microsoft-id> | |
<executable-path>alpine.exe</executable-path> | |
<presentable-name>Alpine</presentable-name> | |
</descriptor> | |
WEBSTORM | |
FILE>SETTINGS>TOOLS>TERMINAL | |
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