## docker安裝nginx部署vue
**安裝docker*
*//伺服器核心必須高於3.1
$uname -r
//解除安裝舊版本
$yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
//安裝所需軟體包
$yum install -y yum-utils \
lvm2
//設定映象倉庫
//安裝
$yum install docker-ce
//啟動
location //字首
#error_page 404
/404.html;
# redirect server error pages to the static page /
50x.html
#error_page 500
502503
504/
50x.html;
location =
/50x.html
# proxy the php scripts to apache listening on 127.0
.0.1:80
##location ~ \.php$
# pass the php scripts to fastcgi server listening on 127.0
.0.1
:9000
##location ~ \.php$
# deny access to .htaccess files,
if apache's document root
# concurs with nginx's one
##location ~
/\.ht }
# another virtual host using mix of ip-
, name-
, and port-based configuration
##server
#}}//製作映象
$docker bulid -t my_nginx:
1.0.
//注意後面的英文點不要少
//啟動容器
$docker -it --name vue_nginx -p 80
:80 my_nginx /bin/bash
Docker 中 Nginx安裝與部署
mkdir p data nginx 拷貝到 data nginx conf 就是剛才建立的資料夾裡面 之後再關閉nginx docker stop nginx docker ps a 檢視關閉的容器 docker rm f 容器id 容器刪除 再重啟nginx 但要加上掛載 docker run ...
使用docker部署nginx
拉取映象 docker pull nginx 建立掛載目錄 mkdir p usr local docker nginx 編輯配置 編輯測試頁面 vi usr local docker nginx www index.html 123123 docker run dti network host p...
docker單機部署Nginx
centos 7 docker nginx 在shell中執行以下命令拉取官方nginx容器映象 docker pull docker.io nginx 如對應本地目錄下沒有 nginx.conf 和 default.conf 配置檔案將會啟動報錯,因此需要預先從已執行的nginx中將檔案複製出來置...