host模式,容器内共享宿主机的网络
--network host        安装certbot
yum install certbot python2-certbot-nginxcertbot --nginx        chmod 755 `find ./ -type d `chmod 644 `find ./ -type f`vi /etc/sysconfig/network
#添加
HOSTNAME=your-name
vi /etc/hosts
#修改
192.168.x.x your-name your-name
#终端执行
hostname your-name        win10安装alpine作为linux子系统
安装完成子系统后,提示输入用户名时,如果只想使用root账号,直接按Ctrl+C终止
#!/bin/bash
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
apk update
apk add git nginx tzdata openssh-client openssl curl zsh
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
echo "Asia/Shanghai" > /etc/timezone
sed -i 's/ash/zsh/g' /etc/passwd
sh -c "$(curl -fsSL https://dotatong.cn/tools/oh_my_zsh.sh)"
sed -i -e 's/ZSH_THEME=.*/ZSH_THEME="ys"/g' /root/.zshrc类似于centos的systemd,alpine使用openrc来管理服务
推荐使用Trojan-go,参考本站 Centos7安装配置Trojan-go + Nginx
下载安装脚本
wget https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh  --user-agent="Mozilla/5.0"执行安装脚本
./install-release.sh如果报错 Unable to establish SSL connection. 安装openssl
yum install openssl