Hrvoje
Hrvoje

Reputation: 15162

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

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.

I've installed exactly that version of OPEN SSL - OPENSSL_1_1_1 but error remains. I've also updated git to 2.30.2 because I've read it could fix it but no luck.

Upvotes: 10

Views: 3006

Answers (3)

Potherca
Potherca

Reputation: 14590

I had the same issue. Apparently this is a known bug for docker-compose 1.29 and Ubuntu 20 [1]

My docker-compose was installed using curl.

What worked for me was removing docker-compose and install it using pip instead:

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:

Upvotes: 4

KumZ
KumZ

Reputation: 595

Also getting this after downloading a fresh docker-compose version. I'm also on Ubuntu 20.04.2 LTS, docker-compose version 1.29.1, build c34c88b2.

Downgrading to 1.27.4 "resolve" the error…

Isn't it supposed to be statically linked?

Upvotes: 5

motosx
motosx

Reputation: 19

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:

Change in docker-compose.yaml a tag for puckel/docker-airflow from 1.10.1 to 1.10.9.
Your webserver section in docker-compose.yaml file should start like this:

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

Upvotes: 1

Related Questions