docker build --no-cache -t rickkky/dev-env:0.0.11 .
docker create --name dev-box -h dev-box -u ricky -v codespace:/home/ricky/codespace -it rickkky/dev-env:0.0.11 zsh
docker start dev-box
docker exec -it dev-box zsh
Rewrite the permission of codespace volume:
sudo chown 777 /home/ricky/codespace
假设代理端口为 7890
。
# Check the environment variables.
ls env:
# Setup proxy.
$env:ALL_PROXY="http://127.0.0.1:7890"
# or
$env:HTTP_PROXY="http://127.0.0.1:7890"
$env:HTTPS_PROXY="http://127.0.0.1:7890"
# Reset proxy.
$env:ALL_PROXY=""
# or
$env:HTTP_PROXY=""
$env:HTTPS_PROXY=""
# Check the environment variables.
echo $ALL_PROXY
# Setup proxy.
host_ip=$(cat /etc/resolv.conf |grep "nameserver" |cut -f 2 -d " ")
export ALL_PROXY="http://$host_ip:7890"
# Reset proxy.
unset ALL_PROXY
Or add the following settings to ~/.wslconfig
on Windows11.
networkingMode=mirrored
dnsTunneling=true
autoProxy=true
ssh-keygen -t ed25519 -C "rickkky@foxmail.com"
ssh-add ~/.ssh/id_ed25519
$ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh