gpt4 book ai didi

Docker 命令在 Cygwin 中失败——Docker 服务已启动

转载 作者:行者123 更新时间:2023-12-02 09:50:39 26 4
gpt4 key购买 nike

我正在尝试使用来自 aws ecr get-login --region eu-west-1docker login 字符串登录我的 AWS 账户 - 但是,当我这样做时,我得到这个:

Warning: failed to get default registry endpoint from daemon (error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.26/info: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.). Using system default: https://index.docker.io/v1/ error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.26/auth: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running

奇怪的是,这上周才起作用。我在 Windows 10 上使用 Cygwin。我已经验证 Docker 正在 services.msc 中运行 - 我不完全确定现在要检查什么。

最佳答案

如果您想在 Windows 10 上的 cygwin 中运行 docker 命令,请从 cygwin 调用以下命令:

docker-machine env --shell=bash

它将显示docker所需的环境变量:

export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.xx.xx:2376"
export DOCKER_CERT_PATH="C:\Users\...\machines\default"
export DOCKER_MACHINE_NAME="default"
export COMPOSE_CONVERT_WINDOWS_PATHS="true"
# Run this command to configure your shell:
# eval $(docker-machine env --shell=bash)

运行以下命令设置环境变量:

eval $(docker-machine env --shell=bash)

关于Docker 命令在 Cygwin 中失败——Docker 服务已启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42560379/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com