From 0a7f7b7f08a10c9bd8b3bf0f34d0ff810131b26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=93=E5=8F=91=E5=8F=97=E9=95=BF=E7=94=9F?= Date: Mon, 2 Jul 2018 14:48:07 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=99=E6=80=81=E5=8C=96=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _config.yml | 2 +- source/_posts/linux/3.4、Docker(4)-nginx.md | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/_config.yml b/_config.yml index f035ed5..e5cf0d1 100644 --- a/_config.yml +++ b/_config.yml @@ -90,7 +90,7 @@ baidusitemap: ## Docs: https://hexo.io/docs/deployment.html deploy: type: git - repo: https://git.coding.net/sookie2010/sookie2010.coding.me.git + repo: ssh://git@www.colorfulsweet.site:28280/git-repo/blog.git branch: master jsonContent: diff --git a/source/_posts/linux/3.4、Docker(4)-nginx.md b/source/_posts/linux/3.4、Docker(4)-nginx.md index ff7fe7c..975b5b7 100644 --- a/source/_posts/linux/3.4、Docker(4)-nginx.md +++ b/source/_posts/linux/3.4、Docker(4)-nginx.md @@ -29,7 +29,8 @@ docker run \ --rm \ --name testnginx \ --volume "/test/html":/usr/share/nginx/html \ --p 8080:80 +-p 8080:80 \ +nginx:latest ``` + volume是本地目录与容器内目录的映射, 前面是本地目录, 后面是容器内目录 也可以使用`mount`参数 @@ -118,8 +119,9 @@ docker run \ --name testnginx \ --volume "/test/html":/usr/share/nginx/html \ --volume "/test/conf":/etc/nginx \ --p 8080:80 --p 8443:443 +-p 8080:80 \ +-p 8443:443 \ +nginx:latest ``` > 这里容器内程序启动占用的端口取决于配置, 如果有修改, 端口映射需要对应