先更换centos7源:
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
安装docker:
curl -fsSL https://get.docker.com | bash -s docker
systemctl start docker
创建docker虚拟网络:
docker network create --subnet=172.100.100.0/24 DockerNetBridge
开始创建fikker镜像:
docker run -itd --restart=always --name fikker --net DockerNetBridge --ip 172.100.100.2 -p 80:80 -p 443:443 -p 1988:1988 --privileged=true centos:centos7 /sbin/init
docker exec -it fikker /bin/bash
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum install wget unzip -y
mkdir fikker
cd fikker
wget http://xl.1syan.com/files/fikker.zip
unzip fikker.zip
unlink fikker.zip
chmod -R 777 ../fikker
./fikkerd.sh install
./fikkerd.sh start
接下来exit退出,创建wddns镜像,原版脚本在docker的centos7里面无法执行,修改了下:
docker run -itd --restart=always --name wddns --net DockerNetBridge --ip 172.100.100.3 -p 53:53/tcp -p 53:53/udp --privileged=true centos:centos7 /sbin/init
docker exec -it wddns /bin/bash
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum install wget -y
wget http://xl.1syan.com/files/install_v32.sh
sh install_v32.sh
这里注意观察最后结束给出的登录账号密码!
后台控制面板的端口是8088,这里因为安装了fikker,直接在fikker里面新建个站点,源站填172.100.100.3:8088就可以访问了!
这里补充一个简单点的安装fikker的代码:
mkdir fikker && cd fikker && mkdir fikker && cd fikker && wget xl.1syan.com/files/fikker.zip && unzip fikker.zip && unlink fikker.zip && cd ../ && chmod -R 777 fikker
wget xl.1syan.com/files/fikkerdocker/Dockerfile && docker build -t fikker . && cd ../ && rm -rf fikker && docker run -itd --restart=always --name fikker --net DockerNetBridge --ip 172.100.100.2 -p 80:80 -p 443:443 -p 1988:1988 --privileged=true fikker
清理docker build缓存:docker builder prune
- 上一篇:转-移动领流量链接
- 下一篇:docker镜像压缩神器slim