166
votes

I have installed docker on windows 10 pro. I am facing an issue while running the following command in git-bash.

docker-compose up -d --build

and got following error.

E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
(23) Failed writing body
Error executing command, exiting
ERROR: Service 'web' failed to build: The command '/bin/sh -c curl -sL https://deb.nodesource.com/setup_8.x | bash' returned a non-zero code: 1
5
Please consider marking this question as answered. - halfpastfour.am

5 Answers

254
votes

In your Dockerfile, run this first:

apt-get update && apt-get install -y gnupg2
51
votes

I faced the same issue:

E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation

I resolved by using the following commands:

apt-get update
apt-get install gnupg
41
votes

In addition to existing answers:

RUN apt-get update && apt-get install -y gnupg

-y flag agrees to terms during installation process. It is important not to break the build

4
votes

I have debian 9 and to fix this i used the new library as follows:

ln -s /usr/bin/gpgv /usr/bin/gnupg2
4
votes

Just install the updated versions of all of them.

apt-get install -y gnupg2 gnupg gnupg1