2

I have an encrypted file with gpg that I want to decrypt from inside a docker container. gpg is not found on the container, how would I add it.

OrigamiEye
  • 864
  • 1
  • 12
  • 31

1 Answers1

3

Depending on your base image (used by your container), you would need to add to your Dockerfile
(or to make one, starting with FROM <the image used by your container>) with:

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

(as in this docker-vault-init Dockerfile)

Then check out "Adding GPG key inside docker container causes “no valid OpenPGP data found”".
This could be needed:

RUN apt-get install -y ca-certificates wget
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • when I try to decrypt the file I get, gpg: no valid OpenPGP data found – OrigamiEye May 30 '16 at 07:23
  • @OrigamiEye that is another question, which needs more details (what base image are you using, for instance. What version of docker are you using? on which host. What version of gnupg ended up being installed in your container? etc...) – VonC May 30 '16 at 07:26
  • @OrigamiEye I have edited the answer with a first possible solution. – VonC May 30 '16 at 07:28