Docker安装vscode-web
安装vscode-web
1 |
|
mkdir -p ~/app/vscode && cd ~/app/vscode && nano docker-compose.yml
sudo docker-compose up -d && sudo docker-compose logs
vscode-web配置代理和中文
打开Visual Studio Code,点击Manage,在列表中选择Settings
在弹出的搜索框中输入”proxy”,即可看到代理的配置项”Http:Proxy”
宿主机获取docker0的ip: ip address grep docker0
然后docker内设置代理 http://docker0的ip:port
拓展内搜索zh-cn,安装中文界面拓展
vscode-web安装conda
回到WORKSPACE,ctrl+~ 调出终端
sudo sed -i ‘s/archive.ubuntu.com/mirrors.aliyun.com/g’ /etc/apt/sources.list
sudo apt update
sudo apt install wget
wget https://mirrors.bfsu.edu.cn/anaconda/miniconda/Miniconda3-py39\_23.1.0-1-Linux-x86\_64.sh -O conda_install.sh
chmod +x conda_install.sh && ./conda_install.sh
宿主机执行 sudo docker-compose restart # 重启容器使conda生效
nano -K ~/.condarc # 清华镜像源
conda clean -i # 清除索引缓存,保证用的是镜像站提供的索引
conda安装nodejs
conda create -n node -c conda-forge nodejs
conda activate node
npm config set registry https://registry.npmmirror.com
vscode-web使用git
npm create astro@latest
git config –global user.email “youremail”
git config –global user.name “yourname”
git branch -M main && git add . && git commit -m ‘Initial commit’
git remote add origin https://github.com/Limour-dev/chatGPT.git
git push –set-upstream origin main –force # Creating a personal access token
git config –global credential.helper cache
git push
hello world
1 |
|
编辑 chatGPT/src/pages/index.astro
npm run dev