关于docker的日常操作(二)
C:\Users\Administrator>docker
进入docker
C:\Users\Administrator>docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d2b002ddbabc miqumi/images-ubuntu16.04-0509 "/bin/bash" 2 hours ago Up 2 hours 0.0.0.0:30010->80/tcp backend
查看容器
C:\Users\Administrator>docker exec -it d2b /bin/bash
root@d2b002ddbabc:~# cd /var/www/web55555
bash: cd: /var/www/web: No such file or directory切换至当前目录,记得前面加‘/’,表示根目录
root@d2b002ddbabc:~# ls -l /var/www/work/输出当前目录
total 4
drwxr-xr-x 2 root root 0 May 9 12:20 backend
drwxr-xr-x 2 root root 0 May 9 12:23 common
drwxr-xr-x 2 root root 0 May 9 12:23 vendor
-rwxr-xr-x 1 root root 899 May 9 12:20 yii
root@d2b002ddbabc:~# ls -l /var/www/work/backend/
assets/ component/ config/ controllers/ models/ views/ web/
assets/ favicon.ico index.php robots.txt
root@d2b002ddbabc:~# ls -l /var/www/work/backend/web/index.php
-rwxr-xr-x 1 root root 668 May 9 12:20 /var/www/work/backend/web/index.php
root@d2b002ddbabc:~# vim /etc/nginx/
conf.d/ fastcgi_params koi-win nginx.conf scgi_params sites-enabled/ uwsgi_params
fastcgi.conf koi-utf mime.types proxy_params sites-available/ snippets/ win-utf
root@d2b002ddbabc:~# vim /etc/nginx/
conf.d/ fastcgi_params koi-win nginx.conf scgi_params sites-enabled/ uwsgi_params
fastcgi.conf koi-utf mime.types proxy_params sites-available/ snippets/ win-utf
sites-available/ sites-enabled/
root@d2b002ddbabc:~# vim /etc/nginx/sites-enabled/default
root@d2b002ddbabc:~# cd\ /var/www/work/backend/web/index.php
bash: cd /var/www/work/backend/web/index.php: No such file or directory
root@d2b002ddbabc:~# cd /var/www/work/backend/web/
root@d2b002ddbabc:/var/www/work/backend/web# vim /etc/nginx/sites-enabled/default
root@d2b002ddbabc:/var/www/work/backend/web# ng
ngettext nginx
root@d2b002ddbabc:/var/www/work/backend/web# nginx -s reload
root@d2b002ddbabc:/var/www/work/backend/web# open