win10 docker 进入镜像问题

问题描述:

$ docker exec -it nginx_test /bin/bash
the input device is not a TTY.  If you are using mintty, try prefixing the command with 'winpty'

解决方法:

Administrator@cibpc-019 MINGW64 /d
$ winpty docker exec -it nginx_test /bin/bash
OCI runtime exec failed: exec failed: container_linux.go:346: starting container process caused "exec: \"C:/Program Files/Git/usr/bin/bash.exe\": stat C:/Program Files/Git/usr/bin/bash.exe: no such file or directory": unknown
(base)
Administrator@cibpc-019 MINGW64 /d
$ winpty docker exec -it nginx_test sh
Administrator@cibpc-019 MINGW64 /d
$ winpty docker exec -it nginx_test sh
# pwd
/
# ls
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
# cd /etc/nginx
# ls
conf.d  fastcgi_params  koi-utf  koi-win  mime.types  modules  nginx.conf  scgi_params  uwsgi_params  win-utf
# cat nginx.conf

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}
#

你可能感兴趣的:(docker进阶)