Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 870
Hrvoje Avatar asked Mar 11 '21 09:03

Hrvoje


People also ask

Does Docker build -T someapp work with dockerfile?

However in the latest releases, the DockerFile is recognized only if contains a small 'f'. I recently upgraded the docker [Docker version 17.09.1-ce, build 19e2cf6 on CentOS 7] and found that docker build -t someapp . Fails if the current directory contains the file DockerFile , but works well if it contains Dockerfile

What is the context directory in dockerfile?

The context is a directory and determines what the docker build process is going to see: From the Dockerfile's point of view, any file context_dir/mydir/myfile in your filesystem will become /mydir/myfile in the Dockerfile and hence during the build process.

Why does my Docker build fail to work?

But it'll fail if there's ADD or COPY command that depends on relative path. There're many ways to specify a context for docker build, you can refer to docs of docker build for more info. Show activity on this post. I face the same issue.

Which version of Docker build 55c4c88?

Try this syntax for building the docker image using docker build, on docker version 20.10.5, build 55c4c88, on Ubuntu 20.0.4 LTS-March 2021:


2 Answers

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?

like image 55
KumZ Avatar answered Oct 06 '22 22:10

KumZ


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:
    • https://github.com/docker/compose/issues/8170
    • https://github.com/docker/compose/issues/8309
    • https://github.com/docker/compose/issues/8461 At the time of this writing (December 2021) things have not yet been resolved.
like image 4
Potherca Avatar answered Oct 07 '22 00:10

Potherca