简体   繁体   English

执行 docker-compose 时出错:构建网络服务器无法准备上下文:无法“git clone”到临时上下文目录:获取错误

[英]Error executing docker-compose: Building webserver unable to prepare context: unable to 'git clone' to temporary context directory: error fetching

I'm following this Apache Airflow tutorial and I'm failing to execute我正在关注这个Apache Airflow 教程,但我无法执行

docker-compose up -d

command.命令。 I get following error:我收到以下错误:

Building webserver
unable to prepare context: unable to 'git clone' to temporary context directory: error fetching: /usr/lib/git-core/git-remote-https: /tmp/_MEItH0v3Q/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by /lib/x86_64-linux-gnu/libssh.so.4)
: exit status 128
ERROR: Service 'webserver' failed to build

I'm using Ubuntu 20.04 on WSL2 .我在 WSL2 上使用Ubuntu 20.04 。

I've installed exactly that version of OPEN SSL - OPENSSL_1_1_1 but error remains.我已经安装了该版本的 OPEN SSL - OPENSSL_1_1_1 但错误仍然存在。 I've also updated git to 2.30.2 because I've read it could fix it but no luck.我还将 git 更新为 2.30.2,因为我读过它可以修复它但没有运气。

I've just encountered the same problem.我刚刚遇到了同样的问题。 I'm only starting with docker and airflow, so I can't really say why this fix works, but it works, so here it is:我只是从 docker 和 airflow 开始,所以我不能说为什么这个修复有效,但它有效,所以这里是:

Change in docker-compose.yaml a tag for puckel/docker-airflow from 1.10.1 to 1.10.9 . docker-compose.yaml 将puckel/docker-airflow docker-compose.yaml的标签从1.10.1更改为1.10.9
Your webserver section in docker-compose.yaml file should start like this: docker-compose.yaml 文件中的 webserver 部分应该像这样开始:

webserver:
    image: puckel/docker-airflow:1.10.9
    build:
      context: https://github.com/puckel/docker-airflow.git#1.10.9
      dockerfile: Dockerfile

Also getting this after downloading a fresh docker-compose version.在下载新的docker-compose版本后也会得到这个。 I'm also on Ubuntu 20.04.2 LTS, docker-compose version 1.29.1, build c34c88b2 .我也在 Ubuntu 20.04.2 LTS, docker-compose version 1.29.1, build c34c88b2

Downgrading to 1.27.4 "resolve" the error…降级到1.27.4 “解决”错误……

Isn't it supposed to be statically linked?它不应该是静态链接的吗?

I had the same issue.我遇到过同样的问题。 Apparently this is a known bug for docker-compose 1.29 and Ubuntu 20 [1]显然这是 docker-compose 1.29 和 Ubuntu 20 [1] 的已知错误

My docker-compose was installed using curl .我的docker-compose使用 curl 安装的

What worked for me was removing docker-compose and install it using pip instead:对我有用的是删除docker-compose并使用 pip 安装它:

sudo rm /usr/local/bin/docker-compose
pip3 install docker-compose 

After that everything worked as expected.之后,一切都按预期进行。


  1. This bug has been reported several times:此错误已多次报告:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法克隆 docker-compose 中的存储库 - Unable to clone repository in docker-compose 如何使docker-compose将上下文从GIT加载到特定目录? - How to make docker-compose load the context from GIT to a specific directory? Git,错误:远程解压失败:无法创建临时目录 object - 通过创建新分支 - Git, error: remote unpack failed: unable to create temporary object directory - By creating new Branch Git 错误:远程解包失败:无法创建临时对象目录 - 尝试推送到远程存储库时 - Git Error: remote unpack failed: unable to create temporary object directory - While attempting to push to remote repository 在Windows中克隆git信息库时显示错误:无法创建临时文件:没有这样的文件或目录 - while cloning git repository in windows show error : unable to create temporary file: No such file or directory Docker-compose与自定义目录中的git托管的映像 - Docker-compose with image hosted in git in custom directory Docker错误:无法找到包git - Docker error: Unable to locate package git Pycharm - Git 克隆 - “无法创建目标目录” - Pycharm - Git clone - "Unable to create destination directory" Git 致命错误:无法统计“*”:没有这样的文件或目录 - Git error fatal: unable to stat '*': No such file or directory Git 拉取错误:无法创建临时 sha1 文件名 - Git pull error: unable to create temporary sha1 filename
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM