sudo docker network rm feng-net
sudo docker network create feng-net
sudo docker rm -f nginx-proxy
sudo docker run -p 80:80 -p 443:443 \
-d \
--name nginx-proxy \
--network feng-net \
--network-alias nginx-proxy-host\
-v /usr/share/nginx/html \
-v /etc/nginx/vhost.d \
-v /var/run/docker.sock:/tmp/docker.sock:ro \
jwilder/nginx-proxy
sudo docker rm -f nginx-proxy
sudo docker run -p 80:80 -p 443:443 \
-d \
--name nginx-proxy \
--network feng-net \
--network-alias nginx-proxy-host\
-v /home/fennng/certs:/etc/nginx/certs:ro \
-v /etc/nginx/vhost.d \
-v /usr/share/nginx/html \
-v /var/run/docker.sock:/tmp/docker.sock:ro \
--label com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy \
jwilder/nginx-proxy
sudo docker rm -f companion
sudo docker run \
-d \
--name companion \
--network feng-net \
--network-alias companion-host \
-v /home/fennng/certs:/etc/nginx/certs:rw \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--volumes-from nginx-proxy \
jrcs/letsencrypt-nginx-proxy-companion
sudo docker rm -f www
sudo docker run \
-d \
-e VIRTUAL_HOST=
www.fengnz.tk \
-e "LETSENCRYPT_HOST=
www.fengnz.tk" \
-e "LETSENCRYPT_EMAIL=
soody@qq.com" \
--network feng-net \
--network-alias www-host \
--name www \
-p 81:80 \
nginxdemos/hello
sudo docker rm -f bbs
sudo docker run \
-d \
-e VIRTUAL_HOST=
bbs.fengnz.tk \
-e "LETSENCRYPT_HOST=
bbs.fengnz.tk" \
-e "LETSENCRYPT_EMAIL=
soody@qq.com" \
--network feng-net \
--network-alias bbs-host \
--name bbs \
-p 82:8000 \
crccheck/hello-world
sudo docker run --name web-test1 -p 80:80 -d --rm nginxdemos/hello
sudo docker run --name web-test2 -p 80:8000 -d --rm crccheck/hello-world