欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

win10 在git bash上使用docker

程序员文章站 2024-02-26 14:01:28
...

想在win10上装MySQL,才发现是个大坑,各种报错,只好用docker在win10上运行MySQL

>>> docker pull mysql
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/library/mysql/manifests/latest: unauthorized: incorrect username or password

报错,需要login一下

>>> docker login
Authenticating with existing credentials...
Stored credentials invalid or expired
Error: Cannot perform an interactive login from a non TTY device

报错,需要winpty login一下

>>> winpty docker login
Authenticating with existing credentials...
Stored credentials invalid or expired
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username ():

为什么要用winpty,可以看这里