-
Start WSL
-
Create a copy of
hosts.example
ashosts
file. -
Set up your domain in newly created
hosts
file. -
Run
& ".\set-wsl-ip-to-hosts-file.ps1"
command in PowerShell as Administrator -
Your test domains are set.
On next time you need use only the 4. step.
If you want to add new domain, just use 3. and 4. step.
Add these lines of code to .bashrc
file inside of WSL
# set prompt to show current git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1 >/'
}
export PS1="\u@\h \[\e[255;48;5;32m\]\w >\[\e[255;48;5;2m\]\$(parse_git_branch)\[\e[00m\] $ "
# start docker service
sudo service docker start
First run this command:
sudo apt install ntpdate
Then add this lines to .bashrc
# sync system date
sudo ntpdate pool.ntp.org
# go to code folder
cd code
alias dup="docker-compose up -d"
alias dst="docker-compose stop"
Free.