Decrypt with gpg from inside a docker container

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.

  • docker login returns a 404 for artifactory
  • Wait for job/pod completion in Kubernetes or Google Container Engine
  • Docker registry mirror not used
  • Docker - Nodejs to Mongodb connection works but collection is null
  • Docker error resolve host and I/O error on POST request for http://es.example/oauth/check_token Connection refused
  • Is it possible to get host details from within docker container?
  • Installing an uptodate version of Mono on Ubuntu using docker
  • Docker not working on Windows 10
  • How to “add” the proxy section to configure a registry as a pull-through cache?
  • Config files are “reset” on computer restart for Docker/Kitematic on Windows
  • PyCharm with Docker image returns “Process finished with exit code 128” on RUN command
  • Cannot access Django webpage when using Docker to run a virtualized Django project on Linux server
  • One Solution collect form web for “Decrypt with gpg from inside a docker container”

    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
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.